question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide a way to re run changed tests only

See original GitHub issue

Description

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:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ludcommented, Jan 10, 2022

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!

0reactions
famodcommented, Jan 10, 2022

Thanks for your feedback!

I’m closing this because cont testing already detects which tests are changed/affected.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found