我需要XUnit测试的NUnit输出报告.使用NUnit,我可以做到:
nunit-console.exe /xml=c:\TestResultN.xml MyDll.dll
Run Code Online (Sandbox Code Playgroud)
我试过了:
xunit.console MyDll.dll /nunit TestResults.xml
Run Code Online (Sandbox Code Playgroud)
但我得到:
unknown output transform: nunit
Run Code Online (Sandbox Code Playgroud)
xunit控制台上的任何好文档?我找不到任何信息.
Nek*_*esh 20
键入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
Run Code Online (Sandbox Code Playgroud)
最后两个选项是从配置文件中提取的,由一个应用于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>
Run Code Online (Sandbox Code Playgroud)
如果您无法找到这些文件,则可能需要重新安装xunit.
| 归档时间: |
|
| 查看次数: |
6923 次 |
| 最近记录: |