Condividi tramite


How to: Specify test agents to use in load test scenarios

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

After you create your load test by using the New Load Test Wizard, you can use the Load Test Editor to change the scenarios properties to meet your testing needs and goals.

Note

Web performance and load test functionality is deprecated. Visual Studio 2019 is the last version where web performance and load testing will be fully available. For more information, see the Cloud-based load testing service end of life blog post. To reduce the impact on users some minimum support is still available in Visual Studio 2022 Preview 3 or later. Users should also note web performance and load test functionality only supports Internet Explorer which is not available on Windows 11 and some versions of Windows 10. Read more on Internet Explorer Lifecycle policy.

Note

For a full list of the load test scenario properties and their descriptions, see Load test scenario properties.

The agents are specified by using the Load Test Editor to change the Agents to Use property in the Properties window.

You can specify the agents that you want your scenario to use if you are using controllers and agents to run the load test remotely. For example, you might want to specify a specific set of agents so that you maintain consistency when you analyze performance trends. Also, agents may be geographically distributed, so that an affinity exists between which scripts they run and where the agent is located.

Tip

Rather than physically putting an agent at the remote site, another option is to use network emulation to emulate the slow network. For more information, see Specify virtual network types.

For more information, see Test controllers and test agents.

Another reason is that some, but not all, agents might have software installed on them that is required for a particular scenario.

You can control agent selection for a given test run by using roles in test settings. For more information, see Collect diagnostic information using test settings.

If a test agent machine has more than 75 percent CPU utilization or has less than 10 percent of physical memory available, add more agents to your load test to make sure that the agent machine does not become the bottleneck in your load test.

To specify the agents to use for a scenario

  1. Open a load test.

    The Load Test Editor appears. The load test tree is displayed.

  2. In the load test trees Scenarios folder, choose the scenario node for which you want to specify the agents to use.

  3. On the View menu, select Properties Window.

    The categories and properties of the scenario are displayed in the Properties window.

  4. In the text box for the Agents to Use property, type the list of agents on which the scenario may run.

    Agents must be separated by commas, for example "Agent1, Agent2, Agent3". Leaving the property blank specifies that the scenario should use all available agents.

    Note

    The Agents to Use property is ignored for local runs. For remote runs, if none of the agents specified in Agents to Use exist, tests in the scenario will not run.

  5. After you change the property, choose Save on the File menu. You can then run your load test by using the new Agents to Use value.

See also