-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[🐛 Bug]: junit reporter problem with cucumber when multiremote #15109
Copy link
Copy link
Closed
Labels
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
9.24.0
Node.js Version
v22.22.0
Mode
WDIO Testrunner
Which capabilities are you using?
capabilities: {
myChromeBrowser: {
capabilities: {
browserName: 'chrome'
}
},
myFirefoxBrowser: {
capabilities: {
browserName: 'firefox'
}
}
},What happened?
Generated junit counts steps as tests:
<?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="3" failures="0" errors="0" skipped="0">
<testsuite name="Three steps" timestamp="2026-02-23T12:39:35" time="0.004" tests="3" failures="0" errors="0" skipped="0">
<properties>
<property name="specId" value="0"/>
<property name="suiteName" value="Three steps"/>
<property name="capabilities" value=""/>
<property name="file" value="file://./features/login.feature"/>
</properties>
<testcase classname=".login.feature:1:1:_Three_steps" name="Given step 1" time="0.001"/>
<testcase classname=".login.feature:1:1:_Three_steps" name="When step 2" time="0.001"/>
<testcase classname=".login.feature:1:1:_Three_steps" name="Then step 3" time="0">
<system-out><![CDATA[
COMMAND: DELETE /session/undefined - {}
RESULT: {}
]]></system-out>
</testcase>
</testsuite>
<testsuite name="Demo" timestamp="2026-02-23T12:39:35" time="0.007" tests="0" failures="0" errors="0" skipped="0">
<properties>
<property name="specId" value="0"/>
<property name="suiteName" value="Demo"/>
<property name="capabilities" value=""/>
<property name="file" value="file://./features/login.feature"/>
</properties>
</testsuite>
</testsuites>What is your expected behavior?
Expected is 1 test and the 3 steps listed in "system-out":
<?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="1" failures="0" errors="0" skipped="0">
<testsuite name="Demo" timestamp="2026-02-23T12:40:40" time="0.007" tests="1" failures="0" errors="0" skipped="0">
<properties>
<property name="specId" value="0"/>
<property name="featureName" value="Demo"/>
<property name="capabilities" value="chrome.145_0_7632_77.mac"/>
<property name="featureFile" value="file://./features/login.feature"/>
</properties>
<testcase classname="CucumberJUnitReport-chrome.145_0_7632_77.mac.Demo" name="Three steps" time="0.002">
<system-out><![CDATA[
✅ Given step 1
✅ When step 2
✅ Then step 3
]]></system-out>
</testcase>
</testsuite>
</testsuites>How to reproduce the bug.
- generate a wdio project with junit and cucumber
- create a multiremote config
- run wdio with the mutliremote config
Alternatively, you can use this repo: https://github.com/la122/wdio-junit-cucumber-multiremote-issue
Relevant log output
<?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="3" failures="0" errors="0" skipped="0">
<testsuite name="Three steps" timestamp="2026-02-23T12:39:35" time="0.004" tests="3" failures="0" errors="0" skipped="0">
<properties>
<property name="specId" value="0"/>
<property name="suiteName" value="Three steps"/>
<property name="capabilities" value=""/>
<property name="file" value="file://./features/login.feature"/>
</properties>
<testcase classname=".login.feature:1:1:_Three_steps" name="Given step 1" time="0.001"/>
<testcase classname=".login.feature:1:1:_Three_steps" name="When step 2" time="0.001"/>
<testcase classname=".login.feature:1:1:_Three_steps" name="Then step 3" time="0">
<system-out><![CDATA[
COMMAND: DELETE /session/undefined - {}
RESULT: {}
]]></system-out>
</testcase>
</testsuite>
<testsuite name="Demo" timestamp="2026-02-23T12:39:35" time="0.007" tests="0" failures="0" errors="0" skipped="0">
<properties>
<property name="specId" value="0"/>
<property name="suiteName" value="Demo"/>
<property name="capabilities" value=""/>
<property name="file" value="file://./features/login.feature"/>
</properties>
</testsuite>
</testsuites>Code of Conduct
- I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- I have searched the existing issues
Reactions are currently unavailable