I am trying to run below command on my build server,
c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe"
"C:\UnitTest\MyTests.dll"
/settings:"C:\UnitTest\output.runsettings"
/UseVsixExtensions:"true"
/InIsolation
/Logger:"trx"
<?xml version="1.0" encoding="UTF-8"?>
<RunSettings>
<RunConfiguration>
<ResultsDirectory>.\TestResults</ResultsDirectory>
</RunConfiguration>
</RunSettings>
It generates TestResults folder which is empty but doesnt have any TRX files.
Update: Getting below warning from command line. However dont see that when I run command in my local machine. Am I missing something in my testproject?
Warning: No test is available in C:\UnitTest\MyTests.dll. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.**
After some research found that I will need to pass the test adapter for visual studio, which makes the tests discover-able.
Here's the complete command,
There is a nuget package available for xunit visual studio test adapter "xunit.runner.visualstudio.0.99.2"