READY API JASON COMPARSION Help
Hello ,
I am trying to implement a dynamic assertion on my test case but i am not able to. Below is the scenario.
1. I made a call to api "ABC" and it gave me a response "M,N,O,X,Y,Z,".
2. I made another call to api "1_ABC" same input and it gave me a response "X1, Y1, Z1"
In the above case X = X1, Y = Y1, Z= Z1 and the values should be same as well. Therefore, after making a call to api "1_ABC", how do i map X= X1 and the X1 value = X value and so on. I want to have this dynamic because i might have to pass different input parameters.
Thanks..
Hi Bishal,
You can do the following:
- add an assertion to the second response
- in this assertion, get the nodes containing "M,N,O,X,Y,Z," from the first response via Get Data. Please refer to this online article for details: http://readyapi.smartbear.com/features/get_data/start
- compare the values you get from the first response with the ones you have in the second response.
It looks like you will need to create one assertion per one value you want to compare. Does it work for you?