2010-12-13 9 views

Odpowiedz

19

Wpisz xunit.console.exe /? w konsoli i spójrz na koniec listy opcji.

> 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 

Dwie ostatnie opcje są wyodrębniane z pliku konfiguracyjnego i składają się z pliku xslt zastosowanego do wyjścia xunit. Jeśli nie ma numeru /nunit, upewnij się, że w katalogu xunit znajduje się plik NUnitXml.xslt, a wpis nunit jest zadeklarowany w pliku xunit.console.exe.config.

Moja xunit.console.exe.config file:

<?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> 

Jeśli nie jesteś w stanie znaleźć tezy plików, może być konieczne ponowne zainstalowanie xUnit.

Powiązane problemy