Moles.runner.exeの使用法をテストランナーとしてMstest.exeで使用します

StackOverflow https://stackoverflow.com/questions/5885313

  •  28-10-2019
  •  | 
  •  

質問

moles.runner.exeを実行し、mstest.exeをランナーとして提供すると、エラーが表示されます。

これがコマンドラインです:

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

これが出力です:

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"

moles.runner.exe with /d(診断モード)を実行すると、これが表示されます。

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

moles.runner.exeをどのように指示できますか いいえ アセンブリ名をテストランナーに最初の引数として渡しますか?

役に立ちましたか?

解決

テストコンテナは必要です いいえ moles.runner.exeに指定されます /args, 、つまり:

/args:/testcontainer:MyAssembly.dll

代わりに、で指定する必要があります /afs (RunnerAssemblyFormAstString)次のように:

/afs:"/testcontainer:{0}"

moles.runner.exeに、mstest.exe-required /testcontainer引数内のテストアセンブリを出力するように指示します。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top