a developer's notes – a semi-technical web development BLOG

November 21, 2013

Visual Studio Performance Testing – Viewing HTTP Responses with Binary Data

When examining a response from a HTTP request, what do you do if it contains binary information?

binaryData1

You can examine the Response tab, but it will also contain binary data information.

binaryData2

What if we just want to just to view the contents on the far right column in a readable format?

binaryData3

One technique would be to copy the entire response into a text editor such as Notepad++. Then you can use the column selection (shift + alt) to remove the binary information.

binaryData5

Then you can do a Find and Replace and remove all the line breaks. In Notepad ++, replace “\r\n” with nothing. Be sure you select the Extended Search Mode.

binaryData6

Now you have the information in a readable format.

{. “object_or_array”: “object”,. “empty”: false,. “parse_time_nanoseconds”: 163674,. “validate”: true,. “size”: 6.}.

Advertisements

November 19, 2013

Visual Studio Performance Load Test – Only First test passes, Subsequent Tests Fails

A big “gotcha” when doing load testing is cached data and stale browser cookies. When examining a load test result, you can spot this symptom when you notice only the 1st (or first few) web tests passes before the test starts to encounter a bunch of failures. Cross check this by making sure your web test can execute many iterations without failure. So if you verified that the web test works with many (if not all) with your data inputs but the load test is producing strange errors, check the following:

1. Percentage of New Users

In your load test file, highlight the Scenario that contains your web test and view its properties. You should find the Percentage of New Users

scenarioProperties

property and set that value to 100. That will ensure all iterations in your web test will be new users.

2. Clear the Cookie Container

Create a WebTestPlugin and on the PreWebTest method, you can clear the container with the following snippet:

public override void PreWebTest(object sender, PreWebTestEventArgs e)
{
     e.WebTest.Context.CookieContainer = new System.Net.CookieContainer();
}

Add this plug-in to ensure at the beginning of each web test, there are no stale cookies from the last virtual user that executed a web test.

Blog at WordPress.com.