Поделиться через


How to: Configure Web Performance Tests to Run Once Per Data Row Using Test Settings

This topic applies to:

Visual Studio Ultimate

Visual Studio Premium

Visual Studio Professional 

Visual Studio Express

Topic applies Topic does not apply Topic does not apply Topic does not apply

Before you can add data binding to a Web request, you must add a data source to your Web performance test. For more information, see one of the following topics:

After you add a data source to a Web request, you can bind a Web performance test request to the data. For more information, see the following topic:

After you have bound a Web performance test to a data source, you must configure how many times you want the Web performance test to access the data. For example, if your data source contains 5,000 rows, you can first run the test using just 10 rows as a test. Then you can run the test using all the rows in the data source.

To configure data binding in a Web performance test

  1. On the Test menu, point to Edit Test Settings, and then click Local(local.testsettings) or the test setting you are currently using.

    Note

    You can determine which test setting is in use by selecting the Select Active Test Settings option from the Test menu.

    The Test Settings dialog box appears.

    Tip

    Instead of editing the test setting, you can also create a separate data run configuration for testing your data binding. Then you can switch between run configurations. For more information, see Configuring Load Test Run Settings.

  2. Select Web Test in the left pane.

  3. Click the One run per data source row option.

    - or -

    Click the Fixed run count option, and enter the number of rows of data to test.

    Note

    No matter which option that you select, the test will start on the first row of data and move sequentially through the data.

  4. Click Save As.

    The Save As dialog appears.

  5. Either click Save to overwrite the existing test setting you selected in step 1.

    -or-

    In the File name text box, type a name for a new test setting and click Save.

    If you created a new test setting, you will see it appear in the Solution Items folder in Solution Explorer. If you want to use the new test setting, you will have to click Select Active Test Settings option on the Test menu and select the new test setting.

    Warning

    If you select a different test setting, it will be used with every type of test in Microsoft Visual Studio Ultimate. Be sure to switch it back once you're done if this impacts your broader testing needs. For more information about test settings, see Create Test Settings to Run Automated Tests from Visual Studio.

  6. On the File menu, click Save to save the Web performance test.

  7. In the Web Performance Results Viewer, you can run your test again by clicking the Click here to run again link on the embedded status bar.

    Tip

    Before you run your test again, you can also modify the number of iterations, network type, or browser type through the run settings. For more information, see How to: Change the Web Performance Test Run Settings in the Web Performance Result Viewer

See Also

Tasks

Walkthrough: Adding Data Binding to a Web Performance Test

Walkthrough: Adding Data Binding to a Web Performance Test (CSV File)

Walkthrough: Adding Data Binding to a Web Performance Test (XML File)

Concepts

Binding a Data Source to a Web Performance Test