Karma captureTimeout and browserNoActivityTimeout limits in singleRun mode
0 reputation · 01 Jan 2022, 20:33 UTC
Goal
Configure Karma to stop a single-run CI execution when a captured browser stops responding, rather than leaving the run pending indefinitely.
Constraints
captureTimeout governs how long Karma waits for a browser to connect before aborting. browserNoActivityTimeout defines the inactivity window after capture, after which Karma treats the browser as unresponsive and fails the run. Karma does not automatically restart the browser, and disconnect recovery behavior varies by launcher plugin. Default windows may be too short where headless browser startup is slow. This assumes Karma 6.x with a pinned launcher plugin and browser binary.
Questions
- Does
browserNoActivityTimeoutapply after successful capture insingleRunmode? - Can
captureTimeoutandbrowserNoActivityTimeoutbe set independently per browser inkarma.conf.js? - What happens to pending test results when
browserNoActivityTimeoutelapses before completion?