Visual Studio Load Test with fiddler

In Visual Studio you add a new Web Performance Test and Internet Explorer opens with the plugin to record the traffic. But what if you want to use another client that not lives in the browser like a Desktop App? Then you can record everything with fiddler (you know how) and export the traffic to Visual Studio Web Test.
export all sessions

The best way to use fiddler for Web Performance Testing is to start fiddler before you start the Desktop App. After starting the app use the crosshair to limit the traffic capture to that app. Remove traffic that already was captured and you don’t want in your test. Now do your thing and quit the App when your done.

You’ll end up with all traffic captured in fiddler. Export all sessions and use the Visual Studio Web Test format. Add this file to your Web Performance Test project.

Use find-and-replace to parameter tests. The parameter must be in format {{ContextParameter}}. I use this for the servername in the URL, the portnumber in the URL and the sessionId (something my program uses) in the requests. The first response message contains this sessionId, so I Add Extraction Rule to assign the value of a XML tag.
extraction rule in test

You set the values for the other Context Parameters in the test run settings by adding the Context Parameter.
Load test scenario Run Settings with Context Parameters

Now you can run the Load Test and simulate the traffic from the Desktop App.

About erictummers

Working in a DevOps team is the best thing that happened to me. I like challenges and sharing the solutions with others. On my blog I’ll mostly post about my work, but expect an occasional home project, productivity tip and tooling review.
This entry was posted in Test and tagged , , , , , , . Bookmark the permalink.

7 Responses to Visual Studio Load Test with fiddler

  1. Pingback: 30 Days of Performance Testing: Days 19-24 – Edinburgh Tester

  2. Ade says:

    Hi Eric,

    Thanks for the guide. However, does latest Visual Studio Load Test with fiddler still work?

  3. Ade says:

    Hi Eric,
    Good to hear that and thanks for the information. However, is it possible to use Test Driven Data (TDD) with fiddlers web load code generated in Visual studio i.e Having 100 users login on a page with their username and password details. If I capture just one login and exported the code to Visual studio, how do you assign the remaining 99 users details in Visual studio?

  4. Ade says:

    Hi Eric,
    Regards, my previous post. I have resolved the issue. However, could you please advise on this issue – On one of my *.webtest the file ‘Cannot be run. Please see Non-ruunnable’ test property for more details.

    • erictummers says:

      Hello Ade,
      Good to hear you’ve got it working.
      Not sure about this ‘Cannot be run’ message, never encountered it myself. On this microsoft forum I’ve read there might be a dependency on another webtest.
      Please let me know when you fix this. I’m sure you’ll get this working too 😉

  5. Ade says:

    Hi Eric,
    I have given up on Visual Studio Load Testing tool> I have to moved to JMeter hopefully I can see Fiddler ability to export to JMeter. Thanks and keep safe.

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 )

Facebook photo

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

Connecting to %s

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