Freigeben über


VSTS 2010 Feature: Web Test Playback Enhancements

This is my second post about new VS 2010 web/load testing features. You can get the beta here: beta download

In this post I am going to talk about a number of usability enhancements that we made to the Web Test Playback UI and how you can use them. The enhancements are

1) Find – You can now do a search in playback UI which will search request headers/bodies, response headers/bodies and the web test context.

2) Add Extraction Rule – In the playback UI, you can now highlight some text in the response and select “Add Extraction Rule”. This will automatically add a rule the web test.

3) Goto webtest – This option will jump you from the request you are on in the playback UI to the same request in the web test. Also if you are on a query string or form post parameter, it will jump you to that parameter in the web test editor.

4) Show Recorded Result – This option will load a playback session with what was recorded. During recording, we now create a web test result of what was recorded. This will help when you want to try and figure out what is different between your current playback session and the recorded session.

 

To demonstrate each of these features, I am going to walk through a demo that will show you how to correlate a dynamic value. I will add an extraction rule to a request and then bind the value from the extraction rule to another request. The demo I am going to walk through is the same one that I use in the following blog post: Correlation Blog Post. This will show you how much easier it is to do this process now. I also want to point out that values we are going to correlate in this demo would actually be caught by the correlation process that runs when you stop recording.

Recording a Web Test

The web test I am going to record is a few requests against a SQL Server Reporting Services site. At the end of my recording session, I see the following results from our correlation dialog.

 

 

So you can see that the parameters that were flagged as needing to be correlated. Instead of having automatic correlation happen, I am going to choose no and manually correlate the parameters.

Playback the web test

Now I am going to playback the web test and then correlate the ReportSession parameter. Here is the test after playing it back:

 

 

Now we will start the correlation process for ReportSession. We will do the following:

1) Find the first occurrence of ReportSession in a response body.

2) Add an extraction rule for that location.

3) Find other locations that ReportSession is used and bind them to the extraction rule.

 

Find Report Session

First we need to bring up the Find dialog. Right click on a request and select Quick Find or hit ctrl-F. This will launch the find dialog. Here is what you will see:

 

 

Enter ReportSession in the Find What text box and select response bodies in the Look in combo box. Then I hit find. Here is what I see.

 

 

As you can see it has found report session in the response body of the first request. Now we need to add an extraction rule.

Add Extraction Rule

We want to add an extraction rule for the value of report session. In this case the value is: p4agdi3gh5qkhh55ebtyox45. So I am going to highlight value, right click and select “Add Extraction Rule”.

 

 

When I do this, I am brought back to my web test and can see that an extraction rule was automatically added for this value.

 

 

I am going to change the Context Parameter name associated with this rule to ReportSession. Now we need to find query string parameters that have ReportSession.

Go to Web Test

I am going to go back to the playback UI and use find again. This time I am searching for ReportSession in a query string parameter. I choose ReportSession as Find What text and search in the Request Headers. You can see it found it in the 3rd request.

 

 

Now I am going to uncheck the Show raw data button so I can see the friendly view of the request parameters. When I do this I can see ReportSession in the QueryStringParameter section. I am going to choose this parameter, right click and select Go to Web Test.

 

 

When I do this, you can see that it took me right to this parameter in the web test editor.

 

 

Now I can change the value for this parameter to {{ReportSession}} so that it will pick up the value from the extraction rule. I am going to rerun the correlation process with the updated web test, and this time it will not find the ReportSession parameter as one that needs to be correlated.

 

 

Go To Recorded Result

There is one other playback feature that I want to point out and it is go to recorded result. As I mentioned above a result file will now be created while you are recording. So while I am working on my web test and want to see what particular values were at record time, I can just pull up the recorded result. To bring up the recorded result, go back to playback. There is a new button on the toolbar from launching the recorded result:

 

 

When I click it, a new playback session will be opened with the recorded result. The title of the tool window will have recorded in it.

 

 

 

I hope these new features will make it easier to work with the playback UI. Please provide feedback when you have a chance to try it out.

Comments

  • Anonymous
    May 28, 2009
    This is my second post about new VS 2010 web/load testing features. You can get the beta here: beta download

  • Anonymous
    May 28, 2009
    Thank you for submitting this cool story - Trackback from DotNetShoutout

  • Anonymous
    June 04, 2009
    This is another post about new VS 2010 web/load testing features. You can get the beta here: beta download

  • Anonymous
    June 08, 2009
    This is another post about new VS 2010 web/load testing features. You can get the beta here: beta download

  • Anonymous
    June 17, 2009
    Recorder Result is a good idea. But I wonder, why is this button missing on the toolbar of webtest definition itself? You have to run the test to see this button - strange and not a good experience.

  • Anonymous
    April 17, 2011
    after recording the script i am not being able to proceed further.please help

  • Anonymous
    May 02, 2012
    Great and  Thank You for the good Explanation.....