You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
junitReporter: run-workers puts each test into its own <testsuite> element #5760
With run-workers, the junitReporter plugin puts every test into its own <testsuite> element. A suite with 2 scenarios produces 2 <testsuite> elements with tests="1" each. Plain run groups them correctly.
Reproduced on 4.x (9f371d4), with and without browsers in multiple.
Each <testcase> still has the correct classname, so tools that group by classname (e.g. Jenkins) still display the tests correctly. The per-suite totals (tests, failures, time) and the <testsuite> structure are wrong, though.
Cause
groupBySuite() in lib/plugin/junitReporter.js groups tests by the identity of test.parent. Under run-workers, each test arrives in the main process deserialized separately, with its own copy of the parent suite, so no two tests share a parent object. #5664 fixed the same problem for suite hook failures (via a suite-title cache), but not for regular tests. Grouping by a value key (e.g. suite title + file) instead of object identity should fix it.
Activity