Verify AJAX Response using Generated Code from a Web Test


Yesterday while doing a web test demo I was asked whether the response from the web service call could actually be verified.  Here is a screen shot of the web test recording.

image 

The web test itself doesn’t let me see the response but what you can do is generate code from the web test.

image

After the code was generated, I modified the last WebTestRequest call as shown below

image

You can check the response back from the web service call as shown above and when the test is run it returns a successful result.

image

I was also asked whether the HTML document could be checked during a web test (not this example) and certainly you could using the method of converting the recording to code.

Wes MacDonald's avatar

About Wes MacDonald

Wes MacDonald is a DevOps Consultant for LIKE 10 INC., a DevOps consulting firm providing premium support, guidance and services for Azure, Microsoft 365 and Azure DevOps.

No comments yet... Be the first to leave a reply!

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.