How to use Mock Service:--
Select File > New SOAP Project.
Once the project you have opened appears in the Navigator, right-click any SOAP interface and select Generate SOAP Mock Service.
The Generate Mock Service dialog will appear. ...
In the next dialog, specify a name for your new mock service and click OK.
If you are waiting for back-end API to finish , you could create mock service like this that defines what responses you would get back and use that to test your front-end.
As we know, what if change method to post if we call get on test path and then that path does not exist.
We do not want to generate load on the server with post test and do not want to put any data. still interact with the product in that way.
There is more we can do as well:
If we see the response we are telling back to give back the 200 status code. we could tell it any other code to get back.
If we create two responses one will status code 200 and other with status code 500. Then when we call this in action- it cycling through these responses because the dispatch option here set to sequence.
We can change the dispatch option with query script and there is option to pass the query and set the value which we like to pass. Then only we can get that value.
Here is Dipatch Option:
Here is QUERY PARAMETER--
No comments:
Post a Comment
Please let me know if you have any doubts.