Skip to content

Instantly share code, notes, and snippets.

@nicolek6
Created December 1, 2020 13:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicolek6/a250d5e69b03336133af422a53ebf34d to your computer and use it in GitHub Desktop.
Save nicolek6/a250d5e69b03336133af422a53ebf34d to your computer and use it in GitHub Desktop.
Using a custom function to implement load test profile
function addStepScenarios(min, max) {
let scenarios = {};
for (let current = min; current <= max; current++) {
scenarios[current] = {
executor: 'constant-vus',
vus: current,
startTime: current - 1 + 'm',
duration: '1m',
};
}
return scenarios;
}
export const options = {
scenarios: addStepScenarios(1, 10),
};
@nicolek6
Copy link
Author

nicolek6 commented Dec 1, 2020

This was written by Simme Aronsson.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment