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

My work as a recruited developer changes almost every month. 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.

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