Hello!
Maybe there is already some related topic, but haven’t found it.
I have a following case:
Need to create some array, where will be pushed some values from different VUs during a test executions. And then I want to go through this array in teardown() and execute some requests there.
Thought about a variable in init stage, but it is visible only in default and is created for each VU separately.
Then tried using data like this:
export function setup() {
let array = [];
return array
}
export default function(data) {
data.push(__ITER)
}
export function teardown(data) {
for (let i = 0; i < data.length; i++) {
console.log(` ITER: ${data[i]} `)
}
}
But then I got this error:
TypeError: Cannot extend Go slice
at push (native)
So the questions are:
- Is it possible somehow to collect data from all VUs and then use it in teardown function?
- If not, is this possible for 1 VU? Because I’m still not able to modify data in default