Last Updated: February 25, 2016
·
788
· Scott Guymer

Using MSTest to process multiple test projects

Recently i needed to process an unknown number of test projects but still have them write to one results file for parsing in an automated build server.

The build server itself wasnt capable of this so after some googleing, trial, error and some harsh language i came up with the following build script cobbled together from a number of sources.

https://gist.github.com/ScottGuymer/9053803

Simply this script does

gets the incoming variable for the results file name if its passed or uses the default
gets a list of all projects that conform to a namint convention .tests.
processes that list into a command line arg for a single mstest run and a single test results file

the build server then picks up the file and parses it to report on the build results!!

took a lot of builds testing but now works a charm!!