SiberianGuy
SiberianGuy

Reputation: 25302

MsTest parallel execution on TeamCity

I have an excellent build server with a huge amount of RAM and processors. Also I have a project with a huge amount of MsTest tests (95% of which are simple unit tests). It is so disappointing to see these tests are executed one by one for 15 minutes. So I am looking for ways to execute these tests in parallel.

As I know TeamCity doesn't have native support for this. Of course you can create Build Configuration for each group of tests and execute them in parallel... but it sucks in many ways.

Continous Testing tools have excellent highly parallelized test runners inside. The best option I came to is to use them as Team City test runner but I have no idea how to implement it. Is there any way?

Upvotes: 2

Views: 1481

Answers (1)

Bronumski
Bronumski

Reputation: 14272

You do not have to use the built in TeamCity test runner steps if you do not want to. You can run your build and tests from a single MSBuild script using a command line test runner and then upload the results to TeamCity.

Whilst you lose the GUI in building up your builds the benefit of doing the build this way is that your build should run the same on your development machine the same as it does on the build server. You are also CI agnostic with the ability to run your build on any CI environment (within reason).

TeamCity XML Report Processing

TeamCity Importing XML Reports

Here is an example:

<Message Text="##teamcity[importData type='mstest' path='path to mstest output xml file']"/>

Upvotes: 2

Related Questions