What is Mockdoor*

Mockdoor is primarily a multi tenanted mocking service, designed to deploy and scale with many Microservices by training off of real data.

It works as a debugging and a mocking tool in development test environments (or a developers local machine) where many Microservices are running. There are many use case for Mockdoor from manually mocking out a simple test endpoint response to intercepting and debugging HTTP requests on a live system and mocking them dynamically, to Time travel debugging of entire environments to removing dependencies during microservice automated testing.

Unlike other mocking services Mockdoor can be ran as an integral part of your development environment by proxying all requests to the real Microservice. It then learns the behaviour of your existing Microservice and enables you to quickly mock out alternative responses or new responses without having to change any of your existing code.

*Mockdoor is currently only in preview/testing stage but is available for usage if desired.

How it works

Mockdoor is not just a mocking system, it integrates a HTTP proxy to allow it to act as a

 transparent middleware between your a caller and a target microservice. By doing this it can learn the real mock behaviour of the systems you intend to mock and/or debug. It also means you never need to make any changes to existing code or designs to work with Mockdoor. The only change you need to make is changing the url your software calls to get its data to the Mockdoor url.

Self learning (Quick on-boarding)

Even large Microservice systems with dozens of services and hundreds, even thousands of endpoints to mock can be mocked out in mere minutes! Just point your services to Mockdoor and run your Automated testing scripts (or manually use the application) and it will instantly populate all the mock models as you use your services.

Time travel

Have a transient bug that only happens occasionally or during a flood of automated tests? No problem, with Mockdoors time travel feature you simply run the application until the bug appears, open Mockdoor and set it to simulate the exact moment the error occurred and you now have a fully mocked out environment of the precise data setup when the error occurred!

Simply mocking?

Need to just mock an empty result but don't want to change code or environmental seeding values etc just to test your empty list page? Just create a simple mock for that endpoint returning an empty list. Even if the underlying model is complex, learn the response and modify it. No need to recreate it from scratch.

Access token troubles?

Are you getting 401s or 403s and can't see the tokens to confirm why? Simply put Mockdoor up and use its Live feed feature to watch the tokens actually sent in those Microservice to Microservice requests.

Got allot of test scenarios or environments

Got allot of setup that is required to run specific tests, and updating between them all is taking too much time? Or multiple environments from local, to K8s to Azure deployments and more? Use the Mockdoor groups feature to create "Test groups" or "Environments" and have granular control over mocks.

Installation

Currently Mockdoor is in preview and can be installed from its docker image (see below) or by compiling it yourself from the source code.

A series of tutorial and demo videos is planned in the near future which will show this process.

It is designed to have zero dependencies to get started so supports an integrated sqlite database to get you up and running, however it is recommended you connect to a Microsoft SQL Server database if you are using it regularly or at scale. It also includes a setup wizard for setting up a large number of tenants and Microservices at once.

Mockdoor supports a number of environments including running in micro k8s and behind reverse proxies or ingress handling to custom base paths. 

There is preliminary support for automatic seeding on startup and support to import and export the entire database to enable easy backup and transfer of the database. This allows exporting the sqlite database to then import into Sql Server when you are ready to migrate over.

Where to get it?

Mockdoor is currently in preview and the source code is available on github. You can also download and run the Docker image from https://hub.docker.com/r/mockdoor/server

Source on github https://github.com/mymockdoor/mockdoor

Demo playground of Microservices https://github.com/mymockdoor/mockdoor.playground

Wiki and documentation at: https://wiki.mymockdoor.com/

API Documentation at: https://app.swaggerhub.com/apis-docs/MOCKDOOR/mockdoor_server/

Roadmap

There is a preliminary roadmap for Mockdoor available here

Donations welcome

Mockdoor has taken allot of work to develop as i am a single developer working in my spare time on Mockdoor. Donations would be greatly appreciated so i can dedicate more time to Mockdoor.

Buy me a drink?

New features here

With the new swagger documentation you can view all APIs with example json requests and even run them

Contact details

If you have any questions, please contact mockdoor@gmx.co.uk