In my jmeter script, i have 2 thread group and User Defined Variables respectively. In user defined variables i'm using the name but with different values in each thread group. When i run the jmx file, i see the value of 2nd thread group had override the 1st thread group. I need to run the thread group with different values for same user defined variable name. Requesting to help me in resolving this issue. Below is the sample screenshot how the jmx file designed.
1
votes
1 Answers
3
votes
As per User Defined Variarbles documentation
For defining variables during a test run, see User Parameters. UDVs are processed in the order they appear in the Plan, from top to bottom.
For simplicity, it is suggested that UDVs are placed only at the start of a Thread Group (or perhaps under the Test Plan itself).
So I believe you should consider migrating to User Parameters instead.
Check out A Quick Guide to JMeter PreProcessors for comprehensive information on User Parameters
and other Pre-Processors with detailed explanation, examples, etc.