Bagikan melalui


Troubleshooting Web Performance Tests

This topic lists the following common issues that occur when you work with Web performance tests in Visual Studio Ultimate.

The Remote Name Could Not Be Resolved

JavaScript and ActiveX Controls Do Not Run

Coded Web Performance Test Error Caused by Unbound Data Source

Resolving Playback Issues Caused by Dynamic Parameters

Space in Query String Parameter TARGET causes Web Performance Test to fail

Requirements

  • Visual Studio Ultimate

The Remote Name Could Not Be Resolved

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

  1. Open a Web performance test.

  2. In the request tree, select the root node. The root node will be the name of the Web performance test.

  3. 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.

    Warning

    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.

JavaScript and ActiveX Controls Do Not Run

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...

The Web Performance Test Results Viewer does not allow script or ActiveX controls to run, because the Web performance test engine does not run them. This message indicates that a real browser would potentially display some additional dynamic content in the page. Typically, no user action is required in response to this message. For more information, see About JavaScript and ActiveX Controls in Web Performance Tests.

Coded Web Performance Test Error Caused by Unbound Data Source

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.

Note

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.

Resolving Playback Issues Caused by Dynamic Parameters

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

Space in Query String Parameter TARGET causes Web Performance Test to fail

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:

WebTestRequest request1 = new WebTestRequest("https://localhost:16939/Default.aspx");
request1. EncodeRedirectedUrl = true;

See Also

Tasks

Walkthrough: Recording and Running a Web Performance Test

Troubleshooting for Testing Tools for Visual Studio ALM

Troubleshooting Load Tests

Concepts

About JavaScript and ActiveX Controls in Web Performance Tests

Strategies for Troubleshooting Test Controllers and Test Agents in Load Tests

Other Resources

Troubleshooting Load and Web Performance Tests