How can I use threshold_1 as the variable to define the options section?
const threshold_1 = "abc"
export const options: Partial<k6Options.Options> = {
scenarios: xxx,
thresholds: {
// how can i define the threshold name as variable?
threshold_1: ["p(95)<5000"],
},
};
Besides, how can I change “status OK” and"content OK" as the variable when I use the check function?
const chk = check(res, {
"status OK": (r) => item_res_status === 200,
"content OK": (r) => item_res_body && item_res_body.indexOf("data\":{\"refId") !== -1,
});