yui / grover

YUITest wrapper for PhantomJS
http://yui.github.com/grover/lib/index.html
Other
45 stars 30 forks source link

Nested testsuites in XML output are not parseable by Jenkins #18

Open reid opened 11 years ago

reid commented 11 years ago

This is a regression in Grover 0.1.16.

Grover 0.1.16 introduced a change that causes additional <testsuites> tags to be nested inside the root <testsuites> tag.

Jenkins will only report tests in <testcase/> tags that are in nested in <testsuite> tags in the root <testsuites> tag. Nested <testsuites> are silently ignored. This comprises the majority of YUI's use of Grover.

(Examples can be found on the internal YUI dev-3.x component build. The regression occurred on build 240. The last correctly working use of Grover was on build 239. Compare the junit.xml artifacts on those builds.)

reid commented 11 years ago

It appears the regression occurred in f5b1f91250fd940f49eb04992cc9baff4fcd7e1f.

The YUITest.TestRunner.getResults("XML") method appears to return nested <testsuites> because of the change to the results object from data[key] to data[name][key] when results has length !== 1.

pablolmiranda commented 11 years ago

The same problem is doing the TAP files receive a wrong head ( first line ). All have 6 test suites with 122 tests, but it only shows 2 tests.