Repository navigation
Conversation
…-workers (codeceptjs#5411) In `run-workers <n> <run> --by suite` with several browsers, the same test had the same uid in every browser, so the main process merged their results, and every worker wrote its partial report.xml into the shared run folder. - Tag every message from a multi-run worker with the run's output folder and make the test uid unique per run - junitReporter: write reports only in the main process, one per run folder - --last-failed: ignore the run suffix when matching saved uids Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…writes it Newer @testomatio/reporter versions write the report to <output>/report and ignore TESTOMATIO_HTML_REPORT_FOLDER. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5411
Problem
With
run-workers <n> <run> --by suiteand several browsers inmultiple, reports lost results:uidin every browser. The main process keys results byuid(Result.addTest(),_testStates), so one browser's results overwrote the other's. The Testomat.io HTML report and the JUnit XML each kept only one browser.report.xmlinto its run folder, and workers of the same browser share that folder (e.g.output/dev_chromium1/). The file kept only the last worker's suites.Fix
lib/workers.js: in a multi-browser run, the main process tags every incoming worker message with the run's output folder (outputDir) and adds the run name to the testuid(<uid>@dev_chromium1). Single-browserrun-workersandrunare not affected, because the tagging happens only for multi-browser runs.lib/plugin/junitReporter.js: only the main process writes the report. When tests carryoutputDir, it writes onereport.xmlper run folder, with all suites of that browser. The plugin'soutputoption is ignored in that case, as documented.lib/codecept.js:--last-failedstrips the@runsuffix before matching saved uids. Otherwise a multi-browser--last-failedrun found no tests.Result, same layout as
run-multiple:The Testomat.io HTML report keeps each browser's results as separate entries.
Tests
test/unit/junitReporter_test.js: one report per run folder, hook failures included, no combined report.test/runner/run_workers_test.js:run-workers 2 dev --by suitewith 2 browsers × 2 suites writes a JUnit report per browser with all 4 tests.test/runner/last_failed_test.js:run-workers 2 dev --last-failedre-runs the 6 failed tests.All new tests fail without the fix. Unit tests: 898 passing.
run_workers_test.js: 42 passing.last_failed_test.js: 14 passing.Also verified on a real project: 3 suites × 2 browsers (Chromium + WebKit) × 2 workers.
🤖 Generated with Claude Code