문제

When I execute moles.runner.exe, providing MSTest.exe as the runner, I'm seeing an error.

Here is the command line:

moles.runner.exe MyAssembly.dll /r:MSTest.exe /args:/resultsfile:output.trx /args:/testcontainer:MyAssembly.dll

Here is the output:

Microsoft Moles Runner v0.94.51023.0 -- http://research.microsoft.com/moles -- .NET v4.0.30319
Copyright (c) Microsoft Corporation 2007-2010. All rights reserved.

instrumenting...started
Microsoft (R) Test Execution Command Line Tool Version 9.0.30729.1
Copyright (c) Microsoft Corporation. All rights reserved.

Invalid switch "MyAssembly.dll"
For switch syntax, type "MSTest /help"

When I execute moles.runner.exe with /d (Diagnostic mode), it shows this:

r>MSTest.exe MyAssembly.dll /resultsfile:output.trx /testcontainer:MyAssembly.dll

How can moles.runner.exe be directed to not pass the assembly name as the first argument to the test runner?

도움이 되었습니까?

해결책

The test container should not be specified to moles.runner.exe with /args, i.e.:

/args:/testcontainer:MyAssembly.dll

Instead, it should be specified with /afs (RunnerAssemblyFormatString) as follows:

/afs:"/testcontainer:{0}"

That will instruct moles.runner.exe to output the test assembly within the MSTest.exe-required /testcontainer argument.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top