Project File Format

The .xunit project file is an XML file with a well-defined format. The top-level node of the project file is the <xunit> node.

Important Note: Because the project file format evolves with newer versions of xUnit.net, there is no associated schema for the XML file. Runner authors who wish to consume these project files must take care to ensure that they do not lock themselves into a specific version of the project file format.

Table of Contents


assemblies element

Element Introduced
<assemblies> 1.5

The assemblies node contains the list of assemblies that are part of this project.

Child Introduced Value
<assembly> 1.5 [1..*] The assemblies that are part of this project


assembly element

Element Introduced
<assembly> 1.5

The assembly node contains information about a single assembly and any metadata which is associated with the execution of that assembly.

Attribute Introduced Value
filename 1.5 Required The pathname of the test assembly
config-filename 1.5 The pathname of the configuration file to use (default: none)
shadow-copy 1.5 Whether the test runner should shadow copy the DLLs on run (default: true)

Note: if the filename and config-filename attributes are relative paths, their path is relative to the location of the project file.

Child Introduced Value
<output> 1.5 [0..*] The output files to generate when the assembly is run


output element

Element Introduced
<output> 1.5

The output node contains the list of output files that should be generated after the tests are run.

Note: The GUI runner does not write output files after running the tests. You must use one of the full-assembly runners to get output files.

Attribute Introduced Value
type 1.5 Required The output type (see comments below)
filename 1.5 Required The pathname of the output file

The built-in types include:

Type Introduced Generated Output
xml 1.5 Writes a raw xUnit.net-style XML output
html 1.5 Writes an HTML report
nunit 1.5 Writes an NUnit-style XML output

Note: if the filename attribute is a relative paths, its path is relative to the location of the project file.

xunit element

Element Introduced
<xunit> 1.5

The xunit node is the top level node of the project file.

Child Introduced Value
<assemblies> 1.5 Required Contains the list of assemblies to be run

Last edited Aug 16, 2009 at 10:38 PM by BradWilson, version 3