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.

[Command line flag that runs all "failures" from the last run]

See original GitHub issue

Whenever I have a failure in playwright it is very expedient to use the --debug flag, however combing through the list of successful tests is time consuming and writing out the specific test on the command line is also tedious. I could write a shell script to handle something like this, but I assume it would be useful for others as well.

I could imagine it operating something like this:

3 failed
20 passed
npx playwright test --debug --failures

Then debug mode is initialized using only the failed tests.

Another implementation could be a “last” flag which could accept [“failures”, “flaky”, “success”, ?] to enable wider functionality and room to grow for new use cases. The “last” would be a reference to the last test run.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:10
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ddemoss222commented, Nov 28, 2021

isn’t this a use case for the retries config option? This will re-attempt failed tests, hence there should ideally be no need for this --failures argument.

“Retries” does not allow for code modification since it only retries immediately after failure. A “failures” flag would be a quality of life enhancement for local development. Skipping all tests that passed would expedite read-eval-print cycles common with hands on playwright usage.

0reactions
dimas7commented, Nov 23, 2022

Really needed feature. It’s hard to re-run failed tests from the suit manually

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to re-run failed tests and maintain state between test runs
The plugin provides two command line options to rerun failures from the last pytest invocation: --lf , --last-failed - to only re-run the...
Read more >
My Most Used pytest Commandline Flags - Adam Johnson
I found I've only use simple string expressions recently. These simply perform substring matches on test names. Often this means running all ......
Read more >
Running Tests — Slash 1.13.0 documentation
This command receives all flags which can be passed to slash run , but receives an id of a previously run session for...
Read more >
Run Specifications - Gauge Documentation
Gauge provides the ability to rerun only the scenarios which failed in the previous execution. You can use the --failed flag with the...
Read more >
How To Use the Flag Package in Go - DigitalOcean
The main function handles errors returned from commands. If any function returns an error, the if statement will catch it, print the error,...
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