1

I am using MSTest to execute my unit tests against a web service on a remote server.

Is there way to change the path to where the results file(.trx) is generated. Currently my test results is generated in the directory which the Exec command is invoked from:

 <Target Name="ExecuteTheTests" AfterTargets="StartService" Condition="'$(ServiceStarted)' == 0 And '$(Configuration)' == 'Release'">
<Message Text="Executing the Unit Tests" Importance="high" />
<PropertyGroup>
  <TestSuccessOrNot>0</TestSuccessOrNot>
</PropertyGroup>
<Exec Command="&quot;C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\Common7\\IDE\\MSTest.exe&quot; /testcontainer:..\..\..\..\\_MyOutput\\UnitTests.dll /detail:testname ">
  <Output TaskParameter="ExitCode" PropertyName="TestSuccessOrNot" />
</Exec>
<Error Condition="$(TestSuccessOrNot) == 1" Text="Unit tests fail!" />

Thanks,

1 Answer 1

1

Many Bothans died* to bring you this message:

mstest.exe /resultsfile:c:\BadPlaceForTestResults.trx
  • j/k, many Bothans didn't die, they just typed "MsTest.exe /?"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.