Troubleshooting Web Performance Tests
This topic lists the following common issues that occur when you work with Web performance tests in Visual Studio Ultimate.
If your Web performance test contains external URLs that are outside your firewall, you might receive the following error message when you run your test:
RequestFailed: The following error occurred which may indicate you need to configure a proxy server in your Web performance test: The remote name could not be resolved.
If you use a proxy server to access Web sites outside your firewall, you must manually set the proxy property on the Web performance test to the proxy server that your browser uses to view Web pages. Set the proxy by using the Web Performance Test Editor.
To specify a proxy server
Open a Web performance test.
In the request tree, select the root node. The root node will be the name of the Web performance test.
In the Properties window, locate the Proxy property and type a valid proxy name. Ask your network administrator for a valid proxy name, or type "default" to use Internet Explorer's proxy settings.
Using "default" as your proxy setting can cause performance problems when you run your Web performance test under load. It is better to specify a proxy other than "default" when you run your Web performance test in a load test.
Web sites that use script or ActiveX controls might display this error message:
Your security settings do not allow Web sites to use ActiveX controls installed on your computer. This page may not display correctly...
While you are trying to run a coded Web performance test, you might see the following error message:
Could not run test <Test Name> on agent <Computer Name>: Object reference not set to an instance of an object.
This can occur because you have a DataSourceAttribute defined for the Web performance test class, without a corresponding DataBindingAttribute. To resolve this error, add an appropriate DataBindingAttribute. Alternatively, if you do not need the DataSourceAttribute delete it or comment it out of the code.
An unbound data source is only one possible cause of the error Object reference not set to an instance of an object. There are other possible causes of this error, including problems in the code of the Web performance test itself. You must also check the code of your Web performance test when you see this error.
You can use several features in Web performance tests to help isolate playback issues in the Web Performance Test Results Viewer. For example, you can use Quick Find to help isolate dynamic parameters that cause the playback to fail in both the Web performance tests playback and the recording log. After the location where a dynamic parameter is being initialized is identified, you can add new extraction rule for it, directly from playback. Adding a new extraction rule eliminates playback failures that are caused by dynamic parameters. You can also easily move back and forth between associated parameters in the Web performance tests playback and the Web Performance Test Editor.
For more information, see Resolving Web Performance Test Result Viewer Playback Issues in Web Performance Tests
Running Web performance tests that contain query string parameter TARGET with blank spaces will cause the test to fail. To correct this, convert your Web performance test into a coded Web performance test and add the EncodeRedirectedUrl property in your implementation of the WebTestRequest class to true as shown in the following code: