-
-
Notifications
You must be signed in to change notification settings - Fork 747
Extend CodeceptJS CLI to run failed tests with --save-failed-tests and --failed-tests options #5126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -166,6 +166,8 @@ program | |
.option('-p, --plugins <k=v,k2=v2,...>', 'enable plugins, comma-separated') | ||
.option('--shuffle', 'Shuffle the order in which test files run') | ||
.option('--shard <index/total>', 'run only a fraction of tests (e.g., --shard 1/4)') | ||
.option('--save-failed-tests [path]', 'save failed tests to JSON file (default: failed-tests.json)') | ||
.option('--failed-tests <path>', 'run only tests from failed tests JSON file') | ||
|
||
// mocha options | ||
.option('--colors', 'force enabling of colors') | ||
|
@@ -207,6 +209,8 @@ program | |
.option('-p, --plugins <k=v,k2=v2,...>', 'enable plugins, comma-separated') | ||
.option('-O, --reporter-options <k=v,k2=v2,...>', 'reporter-specific options') | ||
.option('-R, --reporter <name>', 'specify the reporter to use') | ||
.option('--save-failed-tests [path]', 'save failed tests to JSON file (default: failed-tests.json)') | ||
.option('--failed-tests <path>', 'run only tests from failed tests JSON file') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we need a plugin for that, not a new option |
||
.action(errorHandler(require('../lib/command/run-workers'))) | ||
|
||
program | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -440,6 +440,14 @@ I.see('new title', 'h1'); | |
|
||
* `config`   | ||
|
||
## consolidateWorkerJsonResults | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. bad naming |
||
|
||
Consolidates JSON reports from multiple workers into a single HTML report | ||
|
||
### Parameters | ||
|
||
* `config`   | ||
|
||
## coverage | ||
|
||
Dumps code coverage from Playwright/Puppeteer after every test. | ||
|
@@ -651,6 +659,17 @@ const eachElement = codeceptjs.container.plugins('eachElement'); | |
|
||
Returns **([Promise][9]\<any> | [undefined][10])**  | ||
|
||
## enhancedRetryFailedStep | ||
|
||
Enhanced retryFailedStep plugin that coordinates with other retry mechanisms | ||
|
||
This plugin provides step-level retries and coordinates with global retry settings | ||
to avoid conflicts and provide predictable behavior. | ||
|
||
### Parameters | ||
|
||
* `config`   | ||
|
||
## fakerTransform | ||
|
||
Use the `@faker-js/faker` package to generate fake data inside examples on your gherkin tests | ||
|
@@ -719,10 +738,10 @@ HTML Reporter Plugin for CodeceptJS | |
|
||
Generates comprehensive HTML reports showing: | ||
|
||
- Test statistics | ||
- Feature/Scenario details | ||
- Individual step results | ||
- Test artifacts (screenshots, etc.) | ||
* Test statistics | ||
* Feature/Scenario details | ||
* Individual step results | ||
* Test artifacts (screenshots, etc.) | ||
|
||
## Configuration | ||
|
||
|
@@ -749,7 +768,7 @@ Generates comprehensive HTML reports showing: | |
|
||
### Parameters | ||
|
||
- `config`   | ||
* `config`   | ||
|
||
## pageInfo | ||
|
||
|
@@ -862,6 +881,14 @@ Scenario('scenario tite', { disableRetryFailedStep: true }, () => { | |
|
||
* `config`   | ||
|
||
## safeJsonStringify | ||
|
||
Safely serialize data to JSON, handling circular references | ||
|
||
### Parameters | ||
|
||
* `data`   | ||
|
||
## screenshotOnFail | ||
|
||
Creates screenshot on failure. Screenshot is saved into `output` directory. | ||
|
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bad defaults, this should be enabled for all runs if a plugin is turned on