K6 headless browser is consuming to much traffic

Hi,

This is my first time trying to write a UI load-testing script using k6 browser lib. And I have noticed something interesting.

  1. K6_BROWSER_HEADLESS=false k6 run test.js —> browser_data_received.: 78MB 3.5MB/s
  2. K6_BROWSER_HEADLESS=true k6 run test.js —> browser_data_received: 197MB 9.7MB/s

Why there is such a big difference in data transfer between two different options?

Hi, this might be because these two different modes (headless/headful) use different Chromium engines underneath. Thanks for reporting this. There’s an open issue that will merge these two modes to use the same engine. The memory usage should be similar once this feature lands.