Share via


Configure scenario start delays in load tests

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

Specify a delay before a scenario starts in a load test by using the Load Test Editor and the Properties window.

For example, you might want to use the Delay Start Time property if you need one scenario to start producing items that another scenario consumes. You can delay the consuming scenario to enable the producing scenario to populate some data.

Another example is that you might have one scenario that is only run at a certain time of the day. So, you want to delay the start of the scenario to simulate this.

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.

Specify the delay start time of a scenario

You can specify a delay before the start of a scenario in a load test by using the Load Test Editor to change the Delay Start Time property in the Properties window.

Note

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

An example of an instance when you might want to use the Delay Start Time property is when you need one scenario to start producing items that another scenario consumes. You can delay the consuming scenario to enable the producing scenario to populate some data.

Another example is that you might have one scenario that is run only at a certain time of day. Therefore, you want to delay the start of the scenario to simulate this.

Note

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

To specify the delay start time 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 delay start time.

  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 Delay Start Time property, type a time value that indicates the time to wait after the load test starts before starting the scenario when the load test is run.

    Note

    If the value for the Disable During Warmup property for the scenario is set to True, then the Delay Start Time properties time value will be applied after the warm-up period. You can control which scenarios are included in warm-up by using the Disable During Warmup scenario property.

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

Enable and disable whether a scenario runs during the warm-up period

The Disable During Warmup property is set by using the Properties window. Editing load test scenario properties is set by the Load Test Editor.

The Disable During Warmup property is used to indicate whether the scenario should run or not run during the warm-up period that is specified in the Delay Start Time property. For more information, review the previous procedure Specify the delay start time of a scenario.

Note

For a complete list of the run settings properties and their descriptions, see Load test scenario properties.

To enable or disable the warm-up period 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 that you want to change the warmup behavior for.

  3. On the View menu, select Properties Window.

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

    In the Disable During Warmup property, select either True or False.

  4. After you have finished changing the property, choose Save on the File menu. You can then run your load test using the new Disable During Warmup value.

See also