views:

310

answers:

1

In our msbuild script we can run unit tests without using the vsmdi file:

We would like to enforce tests to be run on check in. The "Testing policy" seems to require a .vsmdi file. Is there a way to do this without one?

A: 

The out-of-the-box testing policy simply checks for the presence of a TestResults folder that has been created since the last checkin, indicating that MSTest has been run. If it finds one it then scans the test results for a reference to the .vsmdi file that is mentioned.

You could write a custom policy that does much the same thing but instead of looking for a .vsmdi file in the test results look for something else as an indicator that tests you want run have actually been run (and that they pass).

Richard Banks