The formats for test-suites and test-case between V2 and V3 are similar, but have some structural and summary differences.
V2:
top-level node is test-results. The attribute total represent the number of executed, where as not-run were not executed. There is no total for passed, it must be inferred from the total by subtracting errors+failures+inconclusives.
test-suites are nested within results nodes, with each part of the namespace represented as a different node. As a result, the depth of the structure is not fixed.
Names for test-suites are partial, whereas the name of the test-case is the fully-qualified namespace + class name + method.
The test-case nodes are held primarily in test-suites that have a TestFixture type, with the exception of ParameterizedTest.
Properties/Categories can be set at the fixture of test-case level.
top level node is test-run. Additional attributes for testcasecount (previously total + not-run), passed (previously total - errors+failures+inconclusive).
test-suite nodes are not deeply nested, though
test-suite now has fullname
test-case no longer has executed or success attributes. The Label attribute contains Error, Cancelled or Invalid if there's a Failed state.
test-case result can be Passed (instead of Success), Failed (instead of Failure), Inconclusive or Skipped.
V2 previously included test-cases for invalid test-fixtures, which were marked as executed="False". V3 does not include these test-case nodes, but the test-suite counts them in the testcasecount attribute, so it's possible to have an empty test-suite that indicates it has test-cases but it does not.
Support for <properties> but not <categories>. In addition to fixture and test-case level, properties are also supported at the test-suite Type="Assembly" level.
Addresses #4
The formats for test-suites and test-case between V2 and V3 are similar, but have some structural and summary differences.
V2:
test-results
. The attributetotal
represent the number of executed, where asnot-run
were not executed. There is no total for passed, it must be inferred from the total by subtracting errors+failures+inconclusives.test-suites
are nested withinresults
nodes, with each part of the namespace represented as a different node. As a result, the depth of the structure is not fixed.test-case
nodes are held primarily intest-suites
that have aTestFixture
type, with the exception ofParameterizedTest
.id
attributes on nodes.V3:
test-run
. Additional attributes for testcasecount (previously total + not-run), passed (previously total - errors+failures+inconclusive).test-suite
nodes are not deeply nested, thoughexecuted
orsuccess
attributes. TheLabel
attribute contains Error, Cancelled or Invalid if there's a Failed state.executed="False"
. V3 does not include thesetest-case
nodes, but thetest-suite
counts them in thetestcasecount
attribute, so it's possible to have an emptytest-suite
that indicates it has test-cases but it does not.<properties>
but not<categories>
. In addition to fixture and test-case level, properties are also supported at the test-suiteType="Assembly"
level.id
attributes are present.This implementation automatically detects whether you are using nunit v2 or nunit v3 format.