Vladimir Dyuzhev
MockMotor Creator
Saving the Day with a Mock
Last Friday, I was asked to help with resolving an urgent issue, which I did - with the help of a mock.
A 5 minutes fix saved probably thousands of dollars.
A non-essential service blocks your testing? Mock it away!
One Service Blocks the Testing
A project in a validation stage had until the end of the day to finish their testing and hand back a number of production-like environments. You can guess that “production-like” means “very expensive.”
However, the project has not yet achieved its testing goal. The flow’s got blocked on an intermediate step. One of the backends inexplicably refused to provide the data required for continuing.
The backend in question is a very complex recommendation system, and troubleshooting its logic could take a day. The perspective of not passing the test and cancelling and re-scheduling the release became all too real. The production-like environments would also have to be reserved again later, at extra cost.
But the Service is Not Essential
However, the problematic service was not the one the project team was testing. The changes were much later in the flow. The team did not even care about this service until it created unexpected problems.
– “If we mock this service, would that be considered a valid test?”
– “Yes, it would!”
Mock it Away!
It took me about 5 minutes to record the expected response from PROD, create a mock service and re-point the validation environment to the mock URL.
The flow has progressed further. The test has passed, and the team was able to report the success of their project in time.
Not even mentioning that they did not have to stay in office past 5 pm on Friday night.