Domanda

Quando eseguo moles.runner.exe, fornendo mstest.exe come corridore, sto vedendo un errore.

Ecco la riga di comando:

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

Ecco l'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"

Quando eseguo moles.runner.exe con /d (modalità diagnostica), mostra questo:

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

Come può essere diretto moles.runner.exe non Passare il nome dell'Assemblea come primo argomento al Test Runner?

È stato utile?

Soluzione

Il contenitore di prova dovrebbe non essere specificato su moles.runner.exe con /args, cioè:

/args:/testcontainer:MyAssembly.dll

Invece, dovrebbe essere specificato con /AFS (RunNassemblyFormatString) come segue:

/afs:"/testcontainer:{0}"

Ciò istruirà a moles.runner.exe di produrre l'assemblaggio di test all'interno dell'argomento MSTEST.EXE-richiesto /TestContainer.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top