How to run ALL tests in my solution using command line MSTest.exe?

I accomplished this using the testmetadata argument and pointing it to my .vsmdi file.

As explained here.


mstest /testmetadata:mySolution.vsmdi

However note that testmetadata can be more fragile (e.g. empty test lists combined with the Ignore attribute cause “Specified cast is not valid”).
Creating a batch with all DLLs containing test classes could be more reliable alternative.

Leave a Comment