API Simulation & Mocking

In a nutshell

sMockin is an open source application used to mock web service APIs.

This helps developers and testers to quickly mimic web services and specifc behavior, that may be unavailable or otherwise complex to set up.

With sMockin's User Interface, API services can be simulated without the need for code, saving time and development resources.

Using expressive yet simple rules, mocked API services can return dynamic content allowing developers to work towards specific use cases.

Features (v 1.6.9)

  • Simple and intuitive User Interface
  • Quickly create web services without the need for code
  • Simulate web based services such as RESTFul endpoints, Websockets, SSE, JMS, FTP and more
  • Return different responses in your mocks with easy to set up rules
  • Run as either a personal tool from your machine or host centrally and create user accounts for your entire team
  • Import your RAML API documentation for instant mocks
  • Bulk export your mocks for version control, portability or to import into another sMockin installation
  • Run sMockin as a Proxy Server across your existing webservices to intercept and substitute requests with your mocks
  • Quick zero fuss installation on any system or platform

Key benefits

  • Design and shape your API in a practical manner
  • See what works and what doesn't in real world scenarios
  • Drive existing components using dynamic simulations
  • Share your API simulations across your team
  • Save time on development and testing in the ever growing and complex world of IoT based infrastructure

Using sMockin

The sMockin framework can be used in a variety of ways within applications, test environments and infrastructure.

Below are just a few examples of how web services can be simulated and drive development...

API Simulation

Where you have a client (mobile app) that needs to make calls to a server:

An example of a basic API with simulated endpoints for login and obtaining data.

Simulating Workflow SOA Components

Swapping out micro services used within an order submission workflow:

An example of the payment service being swapped out and simulated

Simulating Business Logic

An authentication web service can quickly be constructed using inbuilt rules:

A simulated dynamic web service endpoint

Quick start

Please note, further instructions on installing and running sMockin can also be found in the README.txt file bundled within both the source code and binary downloads.

  • Download and copy sMockin to a suitable location
  • Run the install script (install.sh for linux or install.bat for windows)
  • (To enable user accounts, edit .smockin/app.properties (under your user home dir) and set MULTI_USER_MODE = TRUE)
  • Next run the start script (start.sh for linux or start.bat for windows)
  • Finally with sMockin up and running, visit http://localhost:8000 to open the dashboard
(For any issues running sMockin, please consult the Trouble Shooting within the README.txt file)

A quick guide on creating a simple web service:

Further examples of key features and help can be found on the Github Wiki.

Download (v 1.6.9)

  • Source code - available on GitHub here (requires Java 8 and Maven 3)
  • Binary - download here (requires Java 8)
  • Standalone - (Mac OS X download here) (Windows x64 download here) (Java 8 included)
  • Docker - click here or run the following to quickly spin up a container:

    docker run --name smockin -d -p 8000:8000 -p 8001:8001 -p 8002:8002 -p 8003:8003 -p 8010:8010 mgallina/smockin:169

Not familiar with Java or using an earlier version? Download the Standalone edition and follow the same instructions in 'Quick Start'.

Get in contact

Got any questions?
Want to get involved?
Something we could do something better?

Drop us an email at info@smockin.com

We're always keen to hear your thoughts.