We're using TFS Build and are having the TFS Build process run tests through a Test Controller on a Test Agent on a remote machine. We do this via a testsettings file in which we specify the test controller. This testsetting file is specified as an argument in the default TFS 2012 Build process template.
Everything works fine. However, our build takes about an hour. In the event that a test should fail because of an environmental issue (so in the event where it fails only on the test agent and not on our Dev machines), I'd like to be able to re-run the tests and diagnose the environmental issue that happened. However I can't seem to figure out how to do that WITHOUT re-running the entire build. Once the environmental problem is fixed, I'd like to be able to re-run the tests again to make sure everything is ok. I'd like to do all this without re-running the entire build. Ideally when I re-run my tests they should run in as similar a configuration as possible as to when TFS Build runs the tests.
Is there a way to do this? Is using MSTest command line an option to re-run the tests? If so, how do I know which arguments to pass to it? Ideally i'd want the same arguments TFS passed to the QTAgent process which ran the tests?