Captain Hammer
Captain Hammer

Reputation: 47

How can I run unit tests in different projects concurrently using tfsbuild?

I'd love to be able to setup an environment in which I could run unit tests from different projects that are not dependent on each other at the same time to reduce the total amount of time it takes to actually run all of our unit tests. Has anyone successfully done this, and are there any pitfalls?

Upvotes: 0

Views: 68

Answers (1)

gregpakes
gregpakes

Reputation: 4535

There are two simple things you could do to speed up your build.

  1. Use the /m MSBuild paremeter
  2. Use the BuildInParallel MSBuild variable

Taken from Scott Hansleman, here:

In conclusion, BuildInParallel allows the MSBuild task to process the list of projects which were passed to it in a parallel fashion, while /m tells MSBuild how many processes it is allowed to start.

More advanced (more what you're looking for I think)

Taking this further, you could create a custom build template to farm off certain projects to different build controllers. This process is described here.

Upvotes: 1

Related Questions