After the MSDN webpage, I try to manually run mstest in my tfsbuild.proj and put the results in the pass / fail logic, so the build will fail if this particular test fails. This is like starting FxCop or something else from CMD and grabbing “0” or “1” and forcing a build failure.
MSTest / testcontainer: test.dll / publish: http: // ourtfsmachine: 8080 / teamproject: ProjectName / publishbuild: BuildNumber01 / platform: AnyCpu / flavor Release
I could figure out how to run this inside an Exec task, but I don't know what BuildNumber is, for example.
reference
source
share