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.

About wesmacdonald

Wes MacDonald is a Visual Studio ALM MVP, PSD, MCT and a Principal Consultant for LIKE 10 INC., a SharePoint Server, Visual Studio and Team Foundation Server Consulting Firm providing premium support and guidance services.

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: