I have a jmeter project that is of 1 thread, loop of X rounds. The initial queue_username value is set as: "token-user" in the jp@gc - Inter-Thread Communication PostProcessor area.
In each running session, I would like it to pop up the queue_username value from the jp@gc - Inter-Thread Communication PostProcessor section, and also it would put a different value for the queue_username field, as you can see in my code.
So ideally, during the running, I would like to have the output as if:
name is token-user
name is token2-user
name is token-user
name is token2-user
name is token-user
name is token2-user
name is token-user
name is token2-user
...
But in reality, here is what I have received:
name is token-user
name is token-user
name is token2-user
name is token2-user
name is token-user
name is token-user
name is token2-user
name is token2-user
...
Why it is not of the sequential order as I have defined. Any comments?
Thanks,
Jack
It should be sequential, maybe you have queue which is not empty and it returns values from previous executions.
As per documentation:
Note on Clearing Queues
For Plugins
PreProcessor and PostProcessor clear queues at test start and test stop.
For Functions When you stop JMeter test, queues are not cleared automatically (if you haven't used Pre/PostProcessors), so when starting new test you may have some values from previous run in FIFOs. Queues are cleared with the first fifoPut call. To fight this issue you may choose queue names that changes with every test run (eg. relying on test start time, etc).
So double check the size of your queue via __fifoSize()
function and either clear the queue or rename it to something dynamic and you will get sequential usernames.
More information: Inter-Thread Communication