Run Selected/Failed Tests or combine Tests which doesn't fall under a pattern
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, node.js
- Domain
- cli, testing-qa
Research direction
Start by tracing the run and run-workers command handling for the proposed --rerun-test option, then inspect how failedCases.json would be created, read, updated, validated, and removed. Done means rerunning selected or failed files, reporting invalid or missing entries, supporting files from different folders, and clearing the file when the final execution passes.
Written by the indexing model from the issue text.
Description
What are you trying to achieve?
Adding new option to run and run-workers to rerun the failed tests or the selected tests. Option added in --rerun-tests.
Working Nature :
- When the run is initiated and when script(s) fail, the test script will be added in failedCases.json file.
- When the rerun is initiated with the run --rerun-test or run-workers 2 --rerun-test command, test files will be picked from the json file instead of the config file.
- Failed Tests will be updated from the last execution regardless of the mode it ran(either run or run --rerun-tests)
- When all the tests are passed in the last execution, failesCases.json file be deleted from the project folder.
- We can add files from different folders, files which doesn't falls under a single pattern etc.
- When a invalid files or files are provided in the json file, message will be thrown with the invalid file.
- When there is no failedCases.json file or no tests in the failedCases.json file and the run is initiated, appropriate message will be displayed to the user.
Benefits :
- If the failed scripts need to run against different environments, it could be accomplished with this approach.
- You can create failedCases.json manually and run the specific scripts you want to execute using the above commands.
- This would be much useful, if you want to run the scripts which doesn't come under a pattern and from test files from different folders.
Console Outputs :
Failed Scripts when run-workers

Failed Worker Script In Failed Cases

Rerun Of the Failed Script

Failed Cases JSON removed after the Failed Script succeeded

Retries Captured In Allure

Invalid Files Identification

Running Files From Two Different Folder

- Dominant language
- JavaScript
- Stars
- 4.2k
- Forks
- 756
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 16
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from codeceptjs/CodeceptJS
-
stale
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
codeceptjs/CodeceptJS#5420 · 1 comment ·
-
stale
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
codeceptjs/CodeceptJS#5358 · 1 comment ·
-
stale
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
codeceptjs/CodeceptJS#4958 · 10 comments · 2 reactions ·
-
stale
Difficulty 1/5 Under an hour Newbie friendliness 72/100
codeceptjs/CodeceptJS#4778 · 3 comments ·
-
stale
Difficulty 4/5 3-5 days Newbie friendliness 38/100
codeceptjs/CodeceptJS#5618 · 1 comment ·
All issues in codeceptjs/CodeceptJS
Similar issues
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Automattic/safe-publish#594 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
dream-num/dsh-univer-office#104 ·
-
comp/dashboard invalid P3
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
NousResearch/hermes-agent#121143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
avniproject/avni-webapp#1811 ·
-
area/auroraboot area/webui bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100