Provide a way to re run changed tests only
See original GitHub issueDescription
Hi,
When the test suite is huge and takes time to run, there is no way to my knowledge to run only the test I am working on.
I either keep it broken with something like assertTrue(false)
at the end of the test, coupled with broken-only mode, but this is ugly and only practical when there is just one broken test (it does not work when making big changes that will break things).
Otherwise, as soon as the test is green, it will not be ran again in broken-only mode, and running all the tests is not an option when that is slow.
What do you think?
Implementation ideas
I have no idea of how the state is kept for broken tests, but I guess that state could also keep the last time the test ran, to be compared to the compilation time when the file is changed.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Run jest for unit tests of modified files only | by SunCommander
In this article, you will learn how to run Jest for modified files only in a Pull Request. This can be done using...
Read more >JEST: Is there a solution to run tests only for changed ...
Quick answer: No. Long answer: Yes, but it's not that clean or straight forward. I have achieved this through three steps. STEP 1:....
Read more >Rerun unit tests affected by change [closed]
The tool is insanely fast, because it only executes tests affected by your code changes and runs your tests in parallel.
Read more >[Feature] Run only changed tests for playwright test runner
I'm thinking about a possible feature that could be really useful for people using playwright during development - run only tests which code ......
Read more >Jest CLI Options
Run only the tests that were specified with a pattern or filename: jest my-test #or jest path/to/my-test.js. Run tests related to changed ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oh I totally missed this configuration property.
Well that covers my needs. From my point of view this issue can be closed if you are not interested by a “changed tests” mode.
Thank you!
Thanks for your feedback!
I’m closing this because cont testing already detects which tests are changed/affected.