私はいくつかのxUnitテストをビルドの一部として実行しており、結果をTFS 2010にポストする必要があるため、通常のテストのようにビルドサマリー/ログに表示されます。NUnitテスト結果XMLは、TFS 2010ビルドに公開するために必要な形式は何ですか?
-nunit
引数を指定してテストを実行すると、出力はxUnitではなくNUnit xmlになります。私はNUnit4TeamBuildを使用して結果のXMLをTFSに公開しようとしていますが、動作しているように見えますが、最後にテスト結果はありません。
これは、そのステップの詳細なログです:
Publish xUnit Results
NUnitTfs.exe -n results.xml -t Project -b "Build_20171221.8" -v 2010
Loading NUnit Output from results.xml...
Transforming NUnit output to .trx file...
Adding build information to .trx file...
Publishing .trx file...
Checking test run does not exist...
Reading users identity...
Creating test run...
Creating test results...
Updating test run with details...
Uploading test run details...
Uploading assemblies...
Updating test results with details...
Uploading test result details...
ビルドが0のエラーと0警告で終了しますが、また、ビルドの要約に「ませんテスト結果」と言うと、何のテストはありません結果はどこにでもあります。
なぜテストが公開されていないのかわかりません。
ここで、(私はファイルパスを変更し、スタックトレースを短くしたことに注意してください)公開しようとしているXMLの例です:
<?xml version="1.0" encoding="utf-8"?>
<test-results name="Test results" errors="0" inconclusive="0" ignored="0" invalid="0" not-run="0" date="2017-12-21" time="08:39:57" total="1" failures="1" skipped="0">
<environment os-version="unknown" platform="unknown" cwd="unknown" machine-name="unknown" user="unknown" user-domain="unknown" nunit-version="xUnit.net 2.3.1.3858" clr-version="64-bit .NET 4.0.30319.34209 [collection-per-class, non-parallel]" />
<culture-info current-culture="unknown" current-uiculture="unknown" />
<test-suite type="Assemblies" name="C:\Tests.DLL" executed="True" success="False" result="Failure" time="57.41">
<results>
<test-suite type="Assembly" executed="True" name="C:\Tests.DLL" result="Failure" success="False" time="57.410">
<results>
<test-suite type="TestCollection" executed="True" name="Tests" result="Failure" success="False" time="48.992">
<results>
<test-case name="Google_Search_Test" executed="True" result="Failure" success="False" time="48.9917024">
<failure>
<message>System.Exception : Test Failed. Exception has been thrown by the target of an invocation.</message>
<stack-trace>at Tests.Fixtures.Fixture.FormatException(Exception e) in... etc. </stack-trace>
</failure>
</test-case>
</results>
</test-suite>
</results>
</test-suite>
</results>
</test-suite>
</test-results>
: 'ファイルを.trxするためにNUnitの出力を変換する... ファイルを.trxする情報を構築する追加.. 。 公開.trxファイル... ' そして私はあなたが提供した3つのリンクのすべてをすでに見てきました。まだダイスはありません。 –
@ J.Doeテスト結果を見るための正しい権限を設定していない可能性はありますか?このリンクをご覧ください:http://blog.ehn.nu/2010/10/why-cant-i-see-test-results-in-the-tfs-2010-build-report/ –