So I am new to use k6.io and when I just try to add console.log(‘Hi!’) at the init stage, it seems to be called 4 times. I am quite confused here. Any reasoning why? Because I can’t found the reasoning at Test lifecycle
/\ |‾‾| /‾‾/ /‾‾/
/\ / \ | |/ / / /
/ \/ \ | ( / ‾‾\
/ \ | |\ \ | (‾) |
/ __________ \ |__| \__\ \_____/ .io
INFO[0001] Hi! source=console
execution: local
script: script1.js
output: -
scenarios: (100.00%) 1 scenario, 1 max VUs, 10m30s max duration (incl. graceful stop):
* default: 1 iterations for each of 1 VUs (maxDuration: 10m0s, gracefulStop: 30s)
INFO[0001] Hi! source=console
INFO[0001] Hi! source=console
INFO[0001] Hi! source=console
running (00m00.1s), 0/1 VUs, 1 complete and 0 interrupted iterations
default ✓ [======================================] 1 VUs 00m00.0s/10m0s 1/1 iters, 1 per VU
Of course I am quite happy when I found out setup() only called once