I have to do JSON web services automation. Can you suggest what is the best approach for this scenario. Every think I tried to depict on image.
Can you please let me know what are the best tools for this.
Thanks
I have to do JSON web services automation. Can you suggest what is the best approach for this scenario. Every think I tried to depict on image.
Can you please let me know what are the best tools for this.
Thanks
Really depends on the tools you have at your disposal, but here are some options:
1) Write your own client (perl script, c#, whatever) to hit the two REST web services individually, then compare the responses.
2) Use curl.exe or some other pre-built utility to do the HTTP requests, then write a custom script/program to verify the responses.
3) Use a record-playback HTTP test tool like Visual Studio for Testers (or VS Ultimate) to record the HTTP requests to each webservice, and then compare the responses. (you can write c# or VB code to programatically compare them)
However, if you can assume that if JSON response "B" is correct then JSON response "A" must also be correct, you might use that assumption to just verify B and skip A (more of an end-to-end test). In this case you can drive the website or iPad app directly in order to test the web services.