Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Merge several mstest trx files into a single trx file

We use Visual Studio 2008 and MSTest.

We have a batch file that the developers use to get latest version, build solution, run database scripts and run all tests.

The problem is that we have many test projects. So at the end the developer must open each trx file to check if anything failed.

Is there a way to write all test results to a single trx file, or to merge the results to a single file?

Thanks

Shiraz

like image 886
Shiraz Bhaiji Avatar asked Oct 02 '09 10:10

Shiraz Bhaiji


2 Answers

mstest /testcontainer:YourTestContainer1.dll /testcontainer:YourTestContainer2.dll ... + all the other mstest parameters you need, testrunconfig etc. leeds to one .trx file

like image 105
user203327 Avatar answered Sep 21 '22 09:09

user203327


I ran into the same problem when configuring a build server that can only process a single trx file with test results. Running all test assemblies at once is not always an option, e.g. I need to do unit tests, deploy my web app, and then run some UI tests on the deployed application.

I ended up merging my trx files using TRX Merger Utility. Some people's reviews on the page suggest that it didn't work for them, but it works fine for me.

like image 26
Chris Avatar answered Sep 19 '22 09:09

Chris