-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Feature] Is there a way to pause/debug tests on fail? #27635
Comments
This would save so much time. I really don't understand why is not the default behavior with --debug. See a related discussion that died here #10132 When a test fails currently you need to:
This happens very often and every time a minute or so is wasted. |
This feature would be very welcome! I tried to use the Break on (un)caught exceptions, but that triggers too much. I just want to break when an assertion fails, so I can debug whats going on and fix the test that way instead of using the trace viewer. It's very nice, but breaking in debug mode would be better :) |
In TestCafe, there's a simple
--debug-on-fail
command line flag that automatically pauses the test if it fails, so you can troubleshoot and debug it. It is singularly one of the most used and useful command line flags for me in TestCafe, I run it with at least 95% of my test runs.It doesn't seem that Playwright has this pause on fail option, making troubleshooting test failures a big pain. Trying to pinpoint exactly where in the test code it failed, then manually adding an
await page.pause();
before that action or assertion, then rerunning each failed test, then manually performing the action that ostensibly triggered the initial failure, then going back and removing theawait page.pause();
after you've finished debugging.Is there any way (outside of VS Code) to automatically pause a test on failure? It's strange to me that this doesn't seem to be an option.
The text was updated successfully, but these errors were encountered: