Running a hybrid test (Protocol + Browser)

Hi Team,

I already using the k6 protocol level test for the last couple of months, now I’m planning for a Hybrid approach to run Browser automation along with the HTTP protocol test.

  1. Currently I’m running a Protocol level test on Jenkins Slave or AWS CodeBuild based on the situation. if I run the test on headless mode, Is it required to install Chrome binary on those slave hosts, Or need to set any options on AWS CodeBuild?

  2. Currently running the test with

docker run -i grafana/k6 run --out influxdb=… - <script.js

Is it required to pass additional parameters like below?

docker run K6_BROWSER_ENABLED=true -i grafana/k6 run --out influxdb=… - <script.js

Hi @Gerard :wave:

  1. Having a local installation of Google Chrome is required as this is not bundled with k6 or k6 browser. If you are running Google Chrome in a remote machine you can connect to it by using the browserType.connect() method (instead of launch), but that is usually a more complex setup.

  2. Yes, as of now you still have to explicitly set the K6_BROWSER_ENABLED=true env variable to be able to use the browser module in test scripts, which in Docker you would set such as:

docker run --rm -e K6_BROWSER_ENABLED=true -i grafana/k6 run --out influxdb=… - <script.js

Let me know if this helps or you have more doubts.