export function a () {
const aID = X + (vu.idInTest)
.... ${aID }....
.....
};
export function b () {
const bID = X + (vu.idInTest)
.... ${bID }....
.....
};
thank you! for the solution
let’s say that I want to test 2 functions that have to send an Id that is a unique key.
so if my DB has the newest id is 50 I will repress X = 50.
1)function a is to create a new doc.
2)function b is like adding some file to that doc.
after function a crate id 51,52,53,54,55 then
function b will add file to id 51,52,53,54,55 with same id
And I stuck with a problem with sending the same Id to 2 functions.
However, your comment works for me .
and this is my first js project, performance test tools so feel free to comment me with franky
Indeed you are and it’s a perennial problem with performance testing on how to establish communications and data sharing, particularly uniqueness, with virtual users.
When i used loadrunner they had a tool Virtual Table Server (VTS) and jmeter has a built in Simple Table Server (STS) which have both proved useful. At one stage I wrote a node.js server to do so but I’m no node programmer and it was pretty limited.
Of late I’ve been impressed with redis and have used it for both jmeter and k6 scripts. It requires some technical knowledge around extensions and setup and running (and tuning) of redis. However, it’s pretty easy once you get the hang of it.