We recommend using Visual Studio 2017

How to: Enable Collection of Data About the Impact of Code Changes on Unit Tests

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

If you collect data as you run unit tests, you can make better informed decisions about how to test code changes. By default, this data is collected as you run the tests from Team Foundation Build. You can also collect data when you run the tests from your local computer if you also upload the results for a specific build. For more information, see Identifying Code Change Impact on Tests.

To enable data collection in your test project

  1. Open the solution that contains the unit test project for which you want to collect data.

  2. In Solution Explorer, double-click the Local.testsettings file.

    The Configuration Settings - local.testsettings dialog box appears.

  3. In the navigation bar, click Execution Criteria.

  4. In the Collectors list, select the Test Impact Collector check box.

  5. Click Apply, and then click Close.

To enable data collection in a build definition

  1. In Team Explorer, create or modify a build definition.

    For more information, see Building the Application.

  2. In the navigation bar, click Process.

  3. In Build process parameters list, scroll to the Testing category, and set the Analyze Test Impacts property to True.

  4. In Test Container TestSettings File, specify a local.testsettings file for which you have enabled data collection.

  5. On the File menu, click Save BuildName, where BuildName is the name of the build definition that you are creating or modifying.

Show: