In WebdriverIO documentation headless is recommended (meaning using the browsers own headless switch). The drawback is that you can't get a video of the run. We uses XVFB as screen and use ffmpeg to record a video.
Since some time ago, Chromium --headless uses the same code path for both headless and non headless (before it used its own binary for headless). That is good since it should then run through the same code paths. You can also configure Chrome's tracelog to continues take screenshots by adding the trace category disabled-by-default-devtools.screenshot. The user can then drag and drop the trace log into Chrome and see the screenshots.
Should we follow best practices and also use --headless? Let try to measure what kind of overhead ffmpeg/xvfb adds to the test runs so we can take a decision.
Today we have these graphs for CI.
Acceptance Criteria:
- Measure and document the run time (will --headless be faster?).
- For both tests run with at least 1 and 10 simultaneously running tests.
- Create follow up task where the decision can be documented and we can discuss if we should use headless or not