nunit-core team mailing list archive
-
nunit-core team
-
Mailing list archive
-
Message #03775
[Question #238839]: NUnit result file result classification
New question #238839 on NUnit Framework:
https://answers.launchpad.net/nunit-3.0/+question/238839
Hello all,
i recently tried to count the results of a NUnit resultfile using xpath expressions. I have used version 2.5.10. What confuses me are the attributes of the test-case nodes. I have noticed the following attributes:
executed
result
success
time
asserts
So i have created some variables that count the results that way:
<xsl:variable name="TestsAllCount" select="count(/test-results//test-case)"/>
<xsl:variable name="FixturesFailed" select="count(/test-results//test-suite[failure][@type='TestFixture' and @result='Failure'])"/>
<xsl:variable name="TestsFailed" select="count(/test-results//test-case[failure][@executed='True' and @success='False'])"/>
<xsl:variable name="TestsPassed" select="count(/test-results//test-case[@executed='True' and @result='Success'])"/>
<xsl:variable name="FixturesIgnored" select="count(/test-results//test-suite[@type='TestFixture' and @result='Ignored'])"/>
<xsl:variable name="TestsIgnored" select="count(/test-results//test-case[@executed='False' and @result='Ignored'])"/>
<xsl:variable name="FixturesInconclusive" select="count(/test-results//test-case[not(failure)][@executed='True'][@result='Inconclusive'])"/>
<xsl:variable name="TestsInconclusive" select="count(/test-results//test-case[not(failure)][@executed='True'][@result='Inconclusive'])"/>
<xsl:variable name="TestsNotExecuted" select="count(//test-case[@executed='False'])"/>
Is this correct or not?
I dig that ignored and inconclusive test have the executed-attribute set to 'False' but what for is the attribute "success"? Isn't a test successful even if it is ignored or inconclusive? As long as the attribute "success" just takes True|False as values, i wonder why i just can't use the attribute "result" that seems not to have just True|False as value but friendly names like "success", "failure" or "error" or "inconclusive" or "ignored". Is there any documentation about what values are set in what cases? What if a test-suite has 4 test-cases, one test is "Successful", another "Error", another "Ignored" and the last one is "Inconclusive". What value holds the attribute "result" of the appropriate test-suite of the mentioned test-cases? Does it contain all of the values of the test-cases in a comma-separated list? Please help. I am confused. Thank you.
Peter
--
You received this question notification because you are a member of
NUnit Core Developers, which is an answer contact for NUnit Framework.