Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xunitparser does not handle multiple <failure> or <error> per <testcase> #8

Open
dnozay opened this issue Jun 29, 2015 · 0 comments
Open

Comments

@dnozay
Copy link
Contributor

dnozay commented Jun 29, 2015

e.g. parsing these will fail:

<?xml version="1.0" encoding="UTF-8" ?>
<testsuite name="myexample" timestamp="2015-06-24T11:31:08" time="0.01" errors="0" tests="1" skipped="0" failures="2">
  <testcase classname="myexample" name="mytest" time="0.005">
    <failure type="toBe" message="failed expectation #1"></failure>
    <failure type="toBe" message="failed expectation #2"></failure>
  </testcase>
</testsuite>
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite name="myexample" timestamp="2015-06-24T11:31:08" time="0.01" errors="2" tests="1" skipped="0" failures="0">
  <testcase classname="myexample" name="mytest" time="0.005">
    <error type="systemerror" message="system error #1"></error>
    <error type="systemerror" message="system error #2"></error>
  </testcase>
</testsuite>
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite name="myexample" timestamp="2015-06-24T11:31:08" time="0.01" errors="1" tests="1" skipped="0" failures="1">
  <testcase classname="myexample" name="mytest" time="0.005">
    <error type="systemerror" message="system error #1"></error>
    <failure type="failure" message="could not make system call due to system error #1"></failure>
  </testcase>
</testsuite>

however based on the schema defined for jUnit format, they are valid.

see also larrymyers/jasmine-reporters#102

see also https://svn.jenkins-ci.org/trunk/hudson/dtkit/dtkit-format/dtkit-junit-model/src/main/resources/com/thalesgroup/dtkit/junit/model/xsd/junit-4.xsd

            <xs:sequence>
                <xs:element ref="skipped" minOccurs="0" maxOccurs="1"/>
                <xs:element ref="error" minOccurs="0" maxOccurs="unbounded"/>
                <xs:element ref="failure" minOccurs="0" maxOccurs="unbounded"/>
                <xs:element ref="system-out" minOccurs="0" maxOccurs="unbounded"/>
                <xs:element ref="system-err" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant