Unanswered question

Best way to "remember" new record ids?

The version of Neoload I'm using is 4.0.5.

I have the following test (simplified a lot):

  • Virtual User creates record's A, B, C and D
  • [I capture every record Id in a list (comma delimited string variable)]

    [I get record A's Id from the list and assign it to a variable: ${recordId}]

    • Virtual User updates record A [Using ${recordId}]

    [I get record C's Id from the list and assign it to a variable ${recordId}]

    • Virtual User deletes record C [Using ${recordId}]

    What I've done above works fine when you only have one or two simulated users, but when I have 10 simulated users I get some errors, one example is where the application looks for a record that doesn't exist. I think the problem might be that the variables are being set incorrectly, as there are variables being updated all over the place by 10 simulated users.

    Is there a safer, more reliable way to do what I am trying to do here?
    Is it possible to have ${recordId} local to the simulated user being run at that time?
    Is there a better way to "remember" what the new record ids are?

John H.
John H.

John H.

Level
0
1 / 100
point

Answers

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

I'm not sure to understand all your workflow here. When you say "Virtual User creates record's A, B, C and D" is it one virtual user instance or multiple ones? Then i did not understand how you distribute your records A,B,C and D.
My first guess was to use a shared queue. That way you have a virtual user creating those records and put them in a shared queue.

Then all the virtual users can get the records from that shared queue. The rule of the shared queue is first in first out.

Normally, the variables are local to the virtual user instances. That's why there's the shared queue to share values between two different virtual users instances.

Let me know if it makes sense or provide more details on your workflow.