Lots of systems reusing different JSON schemas, which we need to mock,

By using JSON schema / template files to construct and push custom JSON messages to different systems..

Here’s where I have reached so for in solving it and the implementation steps:

Step 1 – Basic structure to push a given JSON file to one system

Step 2 – Add support for more systems to push messages to

Step 3 – Create library to take a ‘JSON Schema’ as a template, and fill placeholders with test data values

The need arises when we have mulitple products to push messages to, all having different JSON message structures,

For testing these systems, instead of having ‘n’ number of JSON files, one per script, I’m thinkging of having standard templates for each product

Which will hopefully make it easier to mock test JSON files, and

Instead of passing the complete JSON, just the template name and a few variable values should do the trick

Still each script might have a sort of ‘config data’ file, but should be quite homogenous within products

Any other ways you’ve tried to implement this, or thoughts on this implementation?

#QSDaily #Automation #MockingData #JSON