headless browser are used for:
- End to End (E2E) Testing (ie integration test)
- test over DOM manipulations
The unit of test is the whole page inside a browser engine. You can emulate and test a complete process that spans across several web pages such as sign up.
The preferred strategy for testing a navigation is to break it down into a series of independent tests where each of which has one “reason” to exist.