As I was checking, k6 provides load testers to pause/resume a live running test (as per docu: How to control a live k6 test, with these built-in commands
Please see my set up.
export const options = {
ext: {
loadimpact: {
projectID: 1234,
// Test runs with the same name groups test runs together
name: "test",
distribution: {
"amazon:sg:singapore": {
loadZone: "amazon:sg:singapore",
percent: 100,
},
},
}
},
stages: [
{ duration: "1m", target: 150 },
{ duration: "3m", target: 150 },
{ duration: "1m", target: 0 },
],
};
export default function() {
let response;
const vars = {};
response = http.get(https://test.com);
sleep(5);
}
Please note also that I am running the output on the k6 cloud.
After running the test…I tried making use of the k6 pause command. I opened a new terminal and entered the command : k6 pause …but it displayed an error.
ERRO[0000] Pause error: ramping-vus executor ‘default’ doesn’t support pause and resume operations after its start
Is there a way for me to work this out? I need to manually pause the live test and resume it whenever I want to.
OR is there a way from k6 wherein we can add a line in the script that will automatically pause the execution after a condition is met. For example. Pause the execution after all VUs were able to iterate one time. Then I can resume the test manually whenever I want to by inputting a command (for example: k6 resume).
Any help or discussion is much appreciated. Thanks.
Additional: I also tried the given exact example of k6 from their pause/resume docu and encountered same error. I am not sure if there is a problem on k6 side itself or what.
k6 sample:
My error: