Share via


Troubleshooting Network Emulation in Load Tests

The troubleshooting information in this topic applies to network emulation for load tests, with a network type other than local area network (LAN) in Microsoft Visual Studio 2010 Ultimate with load tests. In the Edit Network Mix dialog box, you can configure load tests to use the following network types:

  • LAN (Default, does not apply to this troubleshooting topic)

  • 3G

  • Cable-DSL-1.5Mbps

  • Cable-DSL-768k

  • Cable/DSL-384k

  • CDMA

  • Dial-up 56k

  • Intercontinental slow WAN 300 Kbps

  • Intercontinental WAN 1.5 Mbps

  • Intracontinental WAN 1.5 Mbps

For more information, see How to: Create a Network Mix in the New Load Test Wizard and Specifying Virtual Network Types in a Load Test Scenario.

True Network Emulation

Microsoft Visual Studio 2010 uses software-based true network emulation for all test types. This includes load tests. True network emulation simulates network conditions by direct manipulation of the network packets. The true network emulator can emulate the behavior of both wired and wireless networks by using a reliable physical link, such as an Ethernet. The following network attributes are incorporated into true network emulation:

  • Round-trip time across the network (latency)

  • The amount of available bandwidth

  • Queuing behavior

  • Packet loss

  • Reordering of packets

  • Error propagations

True network emulation also provides flexibility to filter network packets that are based on IP addresses or protocols such as TCP, UDP, and ICMP.

True network emulation can be used by network-based developers and testers to emulate a desired test environment, assess performance, predict the effect of change, or make decisions about technology optimization. When compared to hardware test beds, true network emulation is a much cheaper and more flexible solution.

How Network Emulation Works in Load Tests

To use network emulation in load tests, you must have Microsoft Visual Studio 2010 Ultimate installed. Network emulation is configured by using the Edit Network Mix dialog box. This is displayed either with the New Load Test Wizard or by right-clicking an existing scenario in a load test and then clicking Edit Network Mix.

When you start a load test, it allocates a range of available ports for each Network profile that you have selected in your network mix ,for example, DSL and 56.K Modem. This port range is available to the network emulation driver that is enabled at run time (by default, the network emulation driver is disabled).

During load testing, when the load generator sends a request to the application under test, it specifies a port from the port range. When the network emulation driver detects this port from the select port range, it can associate this port with the network profile that this request should follow. This enables the driver to throttle the load in software to make sure that it meets the network profile that you have selected.

How to know Network Emulation is Not Working

Often, one symptom you will see is load test records socket exceptions in the log, such as the following:

"The requested address is not valid in its context xx.xx.xx.xxx:80"

Note

Other conditions could cause such socket exceptions also. The load test might continue to work but the socket exceptions are logged. The next section will help you isolate and troubleshoot the problem.

How to Troubleshoot Network Emulation

To troubleshoot and isolate problems effectively you must make sure that you have completed the basic tests.

  1. Verify that you have full network connectivity across all machines that are participating in your load test.

  2. Make sure that you have configured the network emulation correctly by following the instructions and verifying that administrator rights are available for the test agent.

  3. Check whether all firewalls are disabled when you are troubleshooting to make sure that a firewall is not blocking specific ports or traffic on the network.

    1. Run TCPView to make sure that any socket connections are actually visible during run time Look for "red" highlights.

      Tip

      You may use other port monitoring tools, for example Portmon.

  4. Make sure that no virus software on the load generator machine is obstructing this software.

  5. To isolate whether the problem is with the Network Emulation Driver or the Load Test Components, follow these steps:

    1. Eliminate the network emulation driver as a cause:

      1. Run the load test with network emulation configured correctly, even though you might be seeing socket exceptions.

      2. Ping another host to see whether the output shows network slowdown, higher latency, or both. Check whether the delay value matches the selected network profile. If the latency values match the profile that you have selected, the network driver is working well.

      3. From that test agent machine where you are running the load test, attempt a connection to any host outside,such as your favorite Web page. This test verifies that, when the load test is running and the network driver is enabled, external or lab connectivity is not a problem. This will eliminate your network emulation driver as a problem area.

  6. Eliminate the Load Test Components as a cause:

    1. You can download and run Sendrequests.exe on the same machine as the load generator (test agent machine). Sendrequests.exe is a sample program to troubleshoot socket exceptions during network emulation load tests.

      Warning

      The Sendrequests.exe program is not supported by Microsoft.

      This sample program simulates the exact set of socket connection calls that are used in the load testing components. If this test program also displays socket exceptions, this eliminates the load testing product as a cause for the socket exceptions. The socket exceptions also indicate that the problem is occurring in either the environment, machine, network, or something external to the tooling.

      Please debug the external problem first before you try to run the load test again.

    2. If this sample program is working correctly, you will see the output as shown in the following illustration. This will confirm that a problem likely is occurring in the load test program and that the environment is not the likely cause.

      Sendrequests.exe success output

      SendRequests output

IPSEC Not Compatible with Network Emulation

If IPSEC is enabled, the ports in the network packet are encrypted. Therefore the network emulation driver will not be able to determine that the packets are from the designated port range as set by the load test engine that was described previously in How Network Emulation Works in Load Tests. You must disable IPSEC for network emulation to work.

See Also

Tasks

Troubleshooting Load Tests

How to: Create a Test Setting for a Distributed Load Test

How to: Configure Network Emulation Using Test Settings

How to: Add Networks Using the Load Test Editor

Other Resources

Troubleshooting Load and Web Performance Tests

Specifying Virtual Network Types in a Load Test Scenario