Test Result XML Format | NUnit Docs (original) (raw)

<test-run>

The required root element for any NUnit 3.0 test result file.

<command-line>

Holds a CDATA section containing the text of the command used to run the tests.

<filter>

The XML representation of the filter used to execute tests. This element is also used as a fragment in passing the filter to a runner and by the NUnit 3.0 framework and driver.

<or>

Represents a composite filter that contains other filters. At least one of the contained filters must pass in order for this filter to pass.

<and>

Represents a composite filter that contains other filters. All of the contained filters must pass in order for this filter to pass.

<not>

Represents a composite filter that contains wraps a single base filters. The base filter must fail in order for this filter to pass.

<id>

Represents a filter that examines the test id, which is generated by NUnit.

<test>

<class>

<method>

<prop>

<cat>

<test-suite>

<environment>

Describes the environment in which the tests in a particular assembly are being run.

<settings>

Settings used by the engine for executing an assembly. These are taken from the supplied settings in the TestPackagesupplemented by default settings created by the engine itself.

<setting>

A single setting

<test-case>

<properties>

Optional element containing any properties assigned to the test case or suite.

<property>

A single property

<reason>

Optional element that may appear on tests or suites that were not executed. The element may also appear on tests that were short circuited using Assert.Pass. Contains a message giving the reason for skipping or short circuiting the test.

<failure>

Optional element that appears on all tests or suites with a result of 'Failed'. Optionally contains the error message and/or a stack trace.

<assertions>

<assertion>

<message>

Optional element with a CDATA section containing a message relating to the test's result.

<stack-trace>

Optional element with a CDATA section containing a stack-trace of the location where a test failed.

<output>

Optional element that appears on tests or suites that produce text output. The output may be intercepted from writes to the console or captured directly when the test writes to the TestContext. It is contained in a CDATA section.

<attachments>

Optional element that appears when files are attached to a test. Contains a list of <attachment> elements.

<attachment>

Groups together the file path and description of a test attachment.

<filePath>

Contains the file path for the attachment. Paths will be fully rooted.

<description>

Optional element that contains the user's description of the attachment. It is contained in a CDATA section.