Udostępnij za pośrednictwem


VSTS 2010 Feature: Enhancements for Web Test Playback UI

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
    PingBack from http://asp-net-hosting.simplynetdev.com/vsts-2010-feature-enhancements-for-web-test-playback-ui/

  • Anonymous
    June 03, 2009
    Scott on Calling MSTest from MSBuild or The Price of Not Buying TFS Martin Kulov on Connect to TFS 2010

  • Anonymous
    June 11, 2009
    Beta 1 was released to the web today for MSDN subscribers. If you are a MSDN subscriber, you can download

  • Anonymous
    July 05, 2009
    I have downloaded and installed 'VSTS2010 Beta 1'(without TFS). In order to verify recorded values I navigated to playback session but observed that 'Recorded Result' button is disabled :( Any idea why it is disabled ? What setting I need to configure in order to enable it ?

  • Anonymous
    September 28, 2010
    This is very helpful for the starters, do you have any idea about  how to skip/delete/avoid one subrequest (in headers) image_url which redirecting 404 in one of main request..