Introduce an option to prevent the browser from tearing down when a test fails while running in --debug mode. This would allow developers to investigate the state of the application directly in the browser post-failure, rather than relying solely on reports.
Example
Example:
When running tests with the --debug flag, the browser remains open and retains its state upon encountering a failure. This allows developers to inspect the application at the exact point of failure, providing a more intuitive and efficient debugging process.
Example command:
npx playwright test --debug --preserve-failure
Motivation
Motivation:
The current debugging process often requires adding manual pauses before the expected point of failure, which can be time-consuming and less effective. By keeping the browser open on failure, developers can immediately interact with the application, inspect elements, and better understand the root cause of issues. This feature would streamline the debugging process, making it faster and more efficient, ultimately improving the development workflow and the overall quality of tests.
You can use VS Code extension and select 'Show browsers' option, this will keep the browser open after test run (whether it's failed or passed). We recommend using that instead of --debug.
🚀 Feature Request
Feature Request
Introduce an option to prevent the browser from tearing down when a test fails while running in --debug mode. This would allow developers to investigate the state of the application directly in the browser post-failure, rather than relying solely on reports.
Example
Example:
When running tests with the --debug flag, the browser remains open and retains its state upon encountering a failure. This allows developers to inspect the application at the exact point of failure, providing a more intuitive and efficient debugging process.
Example command:
npx playwright test --debug --preserve-failure
Motivation
Motivation:
The current debugging process often requires adding manual pauses before the expected point of failure, which can be time-consuming and less effective. By keeping the browser open on failure, developers can immediately interact with the application, inspect elements, and better understand the root cause of issues. This feature would streamline the debugging process, making it faster and more efficient, ultimately improving the development workflow and the overall quality of tests.