Mock Release

Be agile with mock-servers.
In API design for microservices platform, a mock release is a preparation phase for productive implementation.
During the mock release phase, the critical aspects of the API are assessed. Assessment of the mock release is performed from a technical perspective by the engineers and from a usability perspective by pilot consumers. Typical design decisions that are explored during the mock release are the backend design decisions and the non-functional properties of the system .

The API mock release should conform to the API description and use real data from real backends. To achieve the necessary speed, the implementation does not have to be pretty, does not have to be optimized, and may contain engineering shortcuts. Code generation can be used to fulfill both goals of practical insights and low effort for the creation of the mock release. Properly generated code conforms to the API description. However, the generated code is merely the “bones” of a skeleton, only the interface of the API can be generated. The missing code can be added with relatively low effort since the skeleton already provides a structure .

Mock API tools can help you run, test and develop your microservice landscape. Using a tool like Mocki, you can create a mock version of your microservice before you start implementing it. This way any future consumers of the API (such as your frontend team) can try it out and give you feedback before you spend any precious development time on implementing the specification . 
 While it is possible to coordinate between the front-end and back-end, it can be very challenging. Besides, we all know coordination and timing doesn’t always align. A mock-server can act as a contract for each team, with expectations set on both sides. A typical workflow can be:

  • Back-end team identifies a contract
  • Back-end and front-end teams begin work at the same time
  • Front-end team updates mock-server to match the contract
  • Front-end team tests their implementation against the mock-server
  • Once back-end is ready, front-end team integrates with the real API and tests against it in a shared environment or locally
https://www.dabbaghbits.com/content/images/size/w2000/2021/06/Screen-Shot-2021-06-19-at-8.54.57-PM.png