I login into my application in Init and use a variable and I want the same variable to be used in Actions and End containers. I am using the change policy as "on each iteration" for this variable.
When Neoload moves from Init to Actions, it increments the value and the same happens when it moves from Action to End and this causes the data to change during the execution. I am aware this is the expected behaviour of Neoload.
1 solution is to set the change policy to "for each Virtual user" but then I cant iterate through all the values in the variables during execution (also depends on the total number of Virtual users we run the test with).
Is there any other solution / suggestion?
Your variable configuration is a little bit weird. Usually you do not share the same variable in Init/End and Actions as they are not executed the same number of times.
If i understand correctly, you would like to use one value in Init/End (same value?) but still to use different values on each iteration right?
I do not see any other ways.
I have to pass the responsibility in Oracle forms in multiple steps during the complete script.
For example, in Init I login and open the responsibility (param 1) and in Actions I do a search with multiple values (param 2) - param 1 is passed in one of the requests in Actions. In logout inside End container I again use param 1 to logout.
Param 1 - works fine with "for each Virtual user" and param 2 works with "on each iteration".
I hope this provides more clarity.
It's possible to use the "For each virtual user" change policy and then a variable modifier in the Actions container but then you won't be able to use the same value in Init and End container.
That's why using another variable to keep the same value in Init/End seems to be the only solution.