Testing Policy completion

What does Visual Studio use to determine if the test run has been completed successfully in order to allow check-in? The reason for the question: why doesn't running these test external to Visual Studio via MSBuild satisfy this policy? I'd like to set a check-in policy that not only requires tests to be run prior to check-in, but also requires the build and tests are using latest code checked-in by others since my check-out. I can do this with a MSBuild script, but running the tests this way does not satisfy the check-in policy.

If I cannot satisfy the test from an external MSBuild script to enable check-in, is there a way to require tests to be run with the latest source? Would a custom check-in policy be the best approach for this requirement?

[772 byte] By [iamGary] at [2007-12-21]
# 1

To determine which tests to use, we look through all of the results that are currently loaded -- i.e., whatever is listed in the test results window. The latest result for each test specified by the check-in policy's test list is examined. If it passing, then the policy is satisfied.

For your scenario, I think you have two options:

1. Easy but not smooth: after running the MSBuild script you wrote, open the trx file in the VS IDE. That should satisfy the policy so you can check in.

2. Smooth but not easy: create a custom check-in policy that runs your MSBuild script and duplicates the functionality of the in-box testing policy.

TomMarshMSFT at 2007-9-10 > top of Msdn Tech,Visual Studio Team System,Team Foundation Server - Version Control...

Visual Studio Team System

Site Classified