This question is locked. New answers and comments are not allowed.
Hi,
I need to execute some MSUnit tests from Test Studio. So I created a test step with code below. I tested in a C# console program with the exact code and I got the test result in a folder; not sure why this doesn't work in the test studio?
The content of my RunUnitTest.bat is below, all the DLLs are in the same folder.
MSTest.exe /testmetadata:KBB.Trident5.vsmdi /testlist:KBB.Trident.Tests /nologo
public void _0_unitTest_CodedStep()
{
// Start the child process.
Process p =
new Process();
// Redirect the output stream of the child process.
p.StartInfo.UseShellExecute =
false;
p.StartInfo.RedirectStandardOutput =
true;
p.StartInfo.FileName =
@"C:\test\RunUnitTest.bat";
p.Start();
string output = p.StandardOutput.ReadToEnd();
p.WaitForExit();
}