playwright icon indicating copy to clipboard operation
playwright copied to clipboard

Playwright Inspector debug mode pause button does not pause test run timeout.

Open billw4 opened this issue 1 year ago • 3 comments

System info

  • Playwright Version: [v1.41.1]
  • Operating System: [Windows 11]
  • Browser: [Chromium]

Source code

Not needed.

Steps When running a test in debug mode, and the Pause button is clicked in the Playwright Inspector window, the test run will pause, but the test run timeout is still enforced and the test will shut down the paused debugger when the test timeout limit is reached.

Clicking the pause button in debug mode should pause the test timeout limit as well.

billw4 avatar Jan 31 '24 16:01 billw4

Could you provide a snippet as debug mode is supposed to suppress the timers. Maybe that is an expect timeout and not test timeout?

pavelfeldman avatar Jan 31 '24 17:01 pavelfeldman

export default defineConfig({ outputDir: 'test-results', testDir: './tests', /* Maximum time one test can run for. */ timeout: 30_000, // Thirty seconds /* Maximum time the test suite can run for. */ globalTimeout: 300_000, // Five minutes ... That's from the playwright config file. Did you need to see a snippet of the test code?

Run in the terminal with npx playwright test --debug <test-class-name>

billw4 avatar Jan 31 '24 21:01 billw4

A test snippet would be nice.

As I mentioned above, --debug disables the 'test timeout', so you can wait as much as you'd like on a pause, before you click 'Step over', there is no race between you and the test timeout. However, if you step over await expect, that call obeys to 'expect timeout', which is significantly shorter. This 'expect timeout' is not disabled because it does not race with the user controlling the debugger. If the condition is not met within the expect budget, expect fails. See https://playwright.dev/docs/test-timeouts for timeout differences.

pavelfeldman avatar Jan 31 '24 22:01 pavelfeldman

Closing as per above, please feel free to reopen a new issue if it does not address it.

pavelfeldman avatar Feb 03 '24 03:02 pavelfeldman