XunitコンソールでnunitフォーマットXMLを出力するにはどうすればよいですか?
-
09-10-2019 - |
質問
レポートのためにXunitテストからのnunit出力が必要です。ヌニットで私はできます:
nunit-console.exe /xml=c:\TestResultN.xml MyDll.dll
私はもう試した:
xunit.console MyDll.dll /nunit TestResults.xml
しかし、私は得ます:
unknown output transform: nunit
Xunitコンソールに良いドキュメントはありますか?情報が見つかりません。
解決
タイプ xunit.console.exe /?
コンソールで、オプションリストの最後を見てください。
> xunit.console.exe /?
xUnit.net console test runner (64-bit .NET 2.0.50727.4952)
Copyright (C) 2007-10 Microsoft Corporation.
usage: xunit.console <xunitProjectFile> [options]
usage: xunit.console <assemblyFile> [configFile] [options]
Valid options:
/silent : do not output running test count
/teamcity : forces TeamCity mode (normally auto-detected)
/wait : wait for input after completion
Valid options for assemblies only:
/noshadow : do not shadow copy assemblies
/xml <filename> : output results to Xunit-style XML file
/html <filename> : output results to HTML file
/nunit <filename> : output results to NUnit-style XML file
最後の2つのオプションは構成ファイルから抽出され、Xunitの出力に適用されたXSLTファイルで構成されています。もしも /nunit
存在しない、あなたが持っていることを確認してください NUnitXml.xslt
Xunitディレクトリとエントリにファイル nunit
で宣言されています xunit.console.exe.config
ファイル。
じぶんの xunit.console.exe.config
ファイル :
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="xunit" type="Xunit.ConsoleClient.XunitConsoleConfigurationSection, xunit.console"/>
</configSections>
<xunit>
<transforms>
<add
commandline="html"
xslfile="HTML.xslt"
description="output results to HTML file"/>
<add
commandline="nunit"
xslfile="NUnitXml.xslt"
description="output results to NUnit-style XML file"/>
</transforms>
</xunit>
</configuration>
これらのファイルを見つけることができない場合は、Xunitを再インストールする必要がある場合があります。
所属していません StackOverflow