2017-03-28 14 views
0

次のdotnet CLIコマンド:dotnet test -l trxを使用して、.netコアプロジェクト(.netコア1.1)でユニットテストステップを実行するJenkinsジョブがあります。 使用されるユニットテストフレームワークはxUnitです。.NET Core 1.1、JenkinsとのxUnit統合テスト結果

問題は、すべてのテストテーブルが「(ルート)」としか呼ばれず、その下の「クラス」レベルにあるすべてのテストテーブルにあるように、出力trxファイル形式がJenkinsテスト結果ビューアと完全に互換性がないことですまた1行ですが、その下の実際のテストメソッドへのナビゲーションを不可能にする名前はありません。

私は、テスト結果を公開するためMSTestJunitHudsonTestTypeでXUnitPublisherを使用しています:

step([$class: 'XUnitPublisher', testTimeMargin: '3000', thresholdMode: 1, thresholds: [[$class: 'FailedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: ''], [$class: 'SkippedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: '']], tools: [[$class: 'MSTestJunitHudsonTestType', deleteOutputFiles: true, failIfNotNew: true, pattern: /TestResults/*.trx', skipNoTestFiles: false, stopProcessingIfError: true]]])

は正しくジェンキンステスト結果ビューでTRXの出力結果を統合する解決策はありますか?

答えて

0

https://github.com/dotnet/cliには、Jenkinsとdotnet testとtrxを使用します。

我々はaddMSTestResultsimplemented hereされていることをthis call

Utilities.addMSTestResults(newJob, '**/*.trx') 

を作ります。

私たちがしていることをエミュレートできるはずです。

関連する問題