Was wondering how K6 browser works when running headless, does this mean that we can get 99% of the measurements even when running headless? Is the rendering still happening in the background, but just not displayed?
Also, are you able to scale a lot more when running headless?
You can imagine each VU as each a separate folder in the browser. It uses one browser instance and for out each VU like a folder.
There is absolutely no point in running this in headed state, Single browser testing is far better done with selenium, playwright or cypress. The k6/browser syntax is similar to playwright. You can take screenshots if you like.
I only use headless: false,when I develop the tests with vus=1
The startup cost for each VU is massive for k6/browser compared to k6, so if scaling is your concern you should just map out the rest api behind it and use standard k6.