Tuesday, 29 June 2010

Recording VSTS WebTests with Fiddler

Although VSTS can be used to record WebTests there is added benefit of using HTTP proxy in that process as explained here.

Following is a general guide on how to use Fiddler to record a WebTest for use in VSTS performance testing:

  1. Start fiddler

  2. Make sure that fiddler is in “Capturing” mode (bottom left corner)

  3. Lunch web browser and navigate to any page

  4. Check Fiddler window; if no request is recorded make sure fiddler plug-in is turned on in the browser. Alternatively web browser proxy settings can be configured manually to and port 8888

  5. Delete all requests from the Fiddler using Remove->All menu option

  6. Switch to the “Request Builder” tab on the right side, type in comment for the next step in the business process (e.g. navigate to application homepage) and click execute button.

    This will result in an incorrect (red) http request recorded by Fiddler which is expected.

    The purpose of this procedure is to add a comment to the recorded script. Once the script is exported into VSTS those invalid requests will be replaced with comments.

    Although there is comment functionality already build-in Fiddler it is awkward to use. Fiddler comments will not be visible in Fiddler and they will only appear when the webtest is opened in VSTS

  7. Refer to the business process script and perform action in the web browser (e.g. navigate to the login page, login, logout, etc.)

    Add a new comment each time a new request(s) is recorded. It is common for a single button click to generate many requests.

  8. Repeat steps 6-8 to complete business process

  9. Switch to Fiddler and click “Capturing” icon in the left bottom corner to stop recording

For the full guide to developing VSTS WebTests please refer to the Using Fiddler with VSTS.

No comments:

Post a Comment