1

I have a few test sets in a single TFS build definition. I'm looking for a way to run all my tests sets in parallel to cut down on the time that the build takes to run.

Below is a screen shot of my build definition and my automated test configurations.

Does any one know how to accomplish this? I'm not seeing a setting in the build definition and I've seen test setting files being used to set this, but I'm not sure where to set the test setting file in the build definition .

enter image description here

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
TWilly
  • 4,863
  • 3
  • 43
  • 73

2 Answers2

0

The new vNext build system can run different build configurations in parallel (on different build agents) so you could, but I'm not sure how practical it would be.

Your tests sets would have to be in 4 different projects. Then you'd need to have different configurations:
- anycpu / release-with-tests1
- anycpu / release-with-tests2
- anycpu / release-with-tests3
- anycpu / release-with-tests4

With that you can enable (build) only 1 test project per configuration and set your build to run all tests (*test.dll), each configuration would only run one test project because the other ones were not built.

You enable the parallel build and it runs on up to 4 agents, depending on how many you have. Each agent would have to download the sources and build them before running the tests, so it could be interesting or not depending on how long your tests actually are.

There is a filter for the binaries you want to copy to your drop folder, so you can copy them for only 1 configuration and not waste disk space.

Sacha K
  • 602
  • 6
  • 22
0

You can use the test frameworks that support multiple threaded execution to run the testing in parallel with multiple cores machines or distribute your test to multiple machines. Refer to this blog from MSDN for details: http://blogs.msdn.com/b/visualstudioalm/archive/2015/07/30/speeding-up-test-execution-in-tfs.aspx

Eddie Chen - MSFT
  • 29,708
  • 2
  • 46
  • 60