user5955036
user5955036

Reputation:

Run functional test task to use multiple cores during build

I know msbuild runs single threaded, but performance wise: can functional/unit tests run on multiple cores to improve performance? we have like 2700 unit tests in our test run and we are searching for ways to improve performance (.net c# build).

We have already split the test run into slow running and long running tests to make test distribution with "distribute test" faster.

Upvotes: 0

Views: 236

Answers (1)

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51183

There is no this build-in feature or setting in TFS test task for now. You can give a try with the method in Jesse Houwing's blog Enable parallel execution of tests using the Visual Studio Test Runner 2015.1

To get the benefits, add the following snippet to your .runsettings file:

<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
  <RunConfiguration>
    <!-- Add this line, default is 1, which makes it run single threaded -->
    <!-- 0 will use all available cores -->
<MaxCpuCount>8</MaxCpuCount>
  </RunConfiguration>
</RunSettings>

Upvotes: 1

Related Questions