When I run cypress open
, the Cypress Test Runner will open + browser and tests are rerun on every file change.
Is it possible to rerun test automatically but in headless mode?
No, it's not possible.
Extracted directly from the Cypress docs
Nothing is watched during cypress run. The watchForFileChanges property is only in effect when running Cypress using cypress open.
npx cypress run --no-exit
; but, didn't work on file change. – Kondasamy Jayaraman