command line error when using mstest.exe

I need a bit of assistance. When I use MsTest.exe as testing framework runner, the command return  following error message.

Invalid switch “c”.For switch syntax, type “MSTest /help”

My command line is:

dotcover analyse /TargetExecutable="c:/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/mstest.exe" /TargetArguments="c:/my.test.target.dll" /ReportType="HTML" /Output="CoverageReport.html"

Please help.

Thanks.

5 comments

Hello Satoshi,

Please use the following command line:
dotcover analyse /TargetExecutable="c:/Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/mstest.exe" /TargetArguments="/testcontainer:c:/my.test.target.dll" /ReportType="HTML" /Output="CoverageReport.html"

Kind regards,
Maria

0

Hi Maria.

Thank you for your advice.
Now I can run the command correctly.:):):)

0

This works for command line. When I try it with XML it fails
How would I make it work?


<?xml version="1.0" encoding="utf-8"?>
<AnalyseParams>
  <TargetExecutable>c:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\MsTest.exe</TargetExecutable>
  <TargetArguments>/testcontainer:c:\Modules\UnitTests\bin\Debug\UnitTests.dll</TargetArguments>
  <Output>C:\Temp\AppCoverageReport.html</Output>
  <ReportType>html</ReportType>
</AnalyseParams>

1

Same error as Shane (Failed to parse xml parameters) with following XML :

<?xml version="1.0" encoding="utf-8"?>
<AnalyseParams>
<TargetExecutable>C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\MSTest.exe</TargetExecutable>
<TargetArguments>/testcontainer:C:\myTests.dll</TargetArguments>
<Output>AppCoverageReport.html</Output>
<ReportType>HTML</ReportType>
</AnalyseParams>

 

Any info on this ?

0

Definitely need to be more verbose on inner exception of ValidationException :o

0

Please sign in to leave a comment.