API Simulation & Mocking


In a nutshell




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


The concept is to help developers and testers, mimic 3rd party web services rather then relying on external and often rigid vendor provided sandboxes. Through simulation, both development and QA activity can immediately benefit from greater flexibility and control.


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


Using rules, sequences and proxies, outcomes can be easily varied, allowing developers to work towards specific use cases.




Features (v 1.5.1)

  • 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
  • New! 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 and information on key features can be found under the Help section of the dashboard.

Download (v 1.5.1)




  • 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:151



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

It will be great to hear your thoughts.