[🐛 Bug]: Allure-reporter 9.20.0 - Parallel multi-capability runs overwrite Allure test results (only last device kept)
Have you read the Contributing Guidelines on issues?
- [x] I have read the Contributing Guidelines on issues.
WebdriverIO Version
9.20.0
Node.js Version
20.*
Mode
WDIO Testrunner
Which capabilities are you using?
capabilities: [
{ browserName: 'chrome', 'wdio-ics:options': { logName: 'Chrome' } },
{ browserName: 'edge', 'wdio-ics:options': { logName: 'Edge' } },
],
};
What happened?
Only one device’s result appears (whichever finishes last). All other devices’ JSON files are overwritten (same filename/uuid). Allure UI shows a single device; filtering by feature/device not possible. On versions pre 9.20.0, I was able to use addFeature/addArgument to differanrtiate different devices a create a basic filter but afterTest/beforeTest calls to addFeature/addArgument are (now) treated the same way and only the test that finnished last is visible in the reporter.
What is your expected behavior?
Each capability execution (same test title) should produce a distinct Allure test entry so the report shows all devices/browsers. Test UUID should be unique per worker/capability (e.g. include cid or capability name). afterTest and beforeTest should still allow adding labels
I could not find any changes in the documentation so I have to assume this is a bug.
How to reproduce the bug.
wdio.repro.conf.ts
import { config as base } from './wdio.shared.js'; export const config: WebdriverIO.Config = { runner: 'local', specs: ['./specs/simple.spec.ts'], maxInstances: 10, framework: 'mocha', reporters: [['allure', { outputDir: 'allure-results' }]], capabilities: [ { browserName: 'chrome', 'wdio-ics:options': { logName: 'Chrome' } }, { browserName: 'edge', 'wdio-ics:options': { logName: 'Edge' } }, ], beforeTest() { //or afterTest const deviceName = browser.requestedCapabilities['wdio-ics:options']['logName']; allureReporter.addArgument('CustomArg', 'A Device - ' + String(deviceName)); allureReporter.addFeature('A Device - ' + String(deviceName)); },
Spec:
describe('Parallel overwrite repro', () => { it('should keep distinct results per capability', async () => { await browser.url('https://webdriver.io/'); await browser.pause(500); // simulate work }); });
After run:
allure-results contains only 1 test result file for "Parallel overwrite repro should keep distinct results per capability". Allure report shows only one test (last finished capability).
Relevant log output
n/a
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Is there an existing issue for this?
- [x] I have searched the existing issues
@todti @epszaw thoughts?
Thanks for reporting!
We greatly appreciate any contributions that help resolve the bug. While we understand that active contributors have their own priorities, we kindly request your assistance if you rely on this bug being fixed. We encourage you to take a look at our contribution guidelines or join our friendly Discord development server, where you can ask any questions you may have. Thank you for your support, and cheers!
That bug is already present in @wdio/allure-reporter 9.0.0 with version 8.6.8 my script: yarn clear:allureresults && yarn chrome:smoketests & yarn edge:smoketests & yarn firefox:smoketests & yarn allure:generate did run smoke test with three browsers and in the end generate the report where all these three results were in. When I upgraded to version 9.0.0 then the smoke test is still run three times by these different browsers but only the last browser run is in the report. Would be nice to get it working again, I was forced to downgrade back to the version 8.6.8 to get the correct reports again.
When running tests with multiple capabilities in parallel (e.g., Chrome and Edge), the Allure reporter was generating identical historyId values for the same test across different capabilities. This caused test result files to overwrite each other, with only the last finished capability's results appearing in the final report.
Root Cause: The _emitHistoryIdsFrom() method generated MD5 hashes based solely on test title without including the capability ID (cid).
Solution: Modified the method to include the cid in the hash calculation: md5(fullTitle + '#' + cid). This ensures each capability generates unique historyIds, preventing file overwrites.
Impact:
- Parallel multi-capability runs now preserve all test results
- Users can filter Allure reports by capability/browser
- Semantically correct: same test on different browsers tracked separately