I’m having trouble running:
- ./xk6-browser run --env scenario=pullrequests tests/scenarios.js
inside Docker. It’s fine if I execute Mac’s xk6-browser binary file locally like using terminal… the tests running fine, but I have the whole framework also with using Docker, entrypoint.sh etc… and everything seems good until executing the binary file downloaded from GitHub (I want to work with downloaded binary file). I downloaded one for Linux, since Docker is running Linux and even I’m on Mac laptop.
What could be wrong? Seems like the k6 starts and then stops for some reason, here’s the output:
/\ |‾‾| /‾‾/ /‾‾/ /\ / \ | |/ / / / / \/ \ | ( / ‾‾\ / \ | |\ \ | (‾) | / __________ \ |__| \__\ \_____/ .io execution: local script: tests/scenarios.js output: - scenarios: (100.00%) 1 scenario, 1 max VUs, 1m30s max duration (incl. graceful stop): * pullrequests: 1 iterations for each of 1 VUs (maxDuration: 1m0s, exec: pullRequests, gracefulStop: 30s) ERRO GoError: launching browser: exec: no command at reflect.methodValueCall (native) at newsletterListing (file:///wp-core/wp-content/plugins/projectplugin/tests/performance/requests/wp-admin/testcase1.js:24:36(7)) at pullRequests (file:///wp-core/wp-content/plugins/projectplugin/tests/performance/tests/scenarios.js:56:1(4)) at native executor=per-vu-iterations scenario=pullrequests source=stacktrace
In my entrypoint.sh file I wrote to execute xk6 perf tests as follows:
if [[ $TEST_TYPE == "performance" ]]; then echo "Executing xk6 performance tests"; # Executing k6 performance tests cd wp-content/plugins/projectplugin/tests/performance/ ./xk6-browser run --env scenario=pullrequests tests/scenarios.js fi
Similar issue in another topic just for reference: Observing "GoError: launching browser: exec: no command while running browser tests on docker