2016-05-20 4 views
1

nunit3で複数のアセンブリパスをテストしたい。これはnunit 2.xで簡単でしたが、nunit 3.2以降では動作しません。NUnit3で複数のアセンブリをテストする

私のコードはそうなります。私はこのスクリプトを実行すると

[string]$path= "C:\CMI\Entwicklung\MetaTool\.build\temp\_PublishedNUnitTests\CMI.Server.DirectImport.Tests\CMI.Server.DirectImport.Tests.dll, C:\CMI\Entwicklung\MetaTool\.build\temp\_PublishedNUnitTests\CMI.Server.DirectImport.Tests\CMI.Server.DirectImport.Tests.dll" 

& $nunitExe $path -work "$NUnitTestResultsDirectory\NUnit.xml" -noheader 

エラーは、パスが有効なパスではないことを、私に語っている表示されます。

答えて

0

プロジェクトファイルは機能しますが、必要はありません。コンマではなく、スペースを区切ってパスを渡すだけです。

[string]$path1="C:\CMI\Entwicklung\MetaTool\.build\temp\_PublishedNUnitTests\CMI.Server.DirectImport.Tests\CMI.Server.DirectImport.Tests.dll" 

[string]$path2="C:\CMI\Entwicklung\MetaTool\.build\temp\_PublishedNUnitTests\CMI.Server.DirectImport.Tests\CMI.Server.DirectImport.Tests.dll" 

& $nunitExe $path1 $path2 -work "$NUnitTestResultsDirectory\NUnit.xml" -noheader 
+1

Thaanks、それは動作します! –

+0

もし私がどれくらいのパスを持っているのか分からないなら、どうすればこの問題を解決できますか? –

+0

コマンドラインで必要な数だけパスを指定することができます。カンマ区切りではなく、スペースで区切る必要があります。 – Chris

0

NUnitプロジェクトファイル(.nunit)を作成する必要があります。そこに複数のdllとその他の設定を表示することができます。こちらを参照してください:http://nunit.org/index.php?p=projectEditor&r=2.6.4 NUnit 3のドキュメントはまだありません。

+0

ありがとう、私はそれを試してみましょう! –

関連する問題