3
votes

Hi merged two thread groups in to single test plan and have two User defined variable element for them

In both User defined variables I have a variable called rubyUrl which has different value in each thread group when I execute the test plan together I am facing Issues because of the variable name conflict between two different thread groups

please help me how can I tell Jmeter that It should pick the variable from which thread group

2
can I get reply for this ,since it is an urgent Issue and I need to fix it todaySwathi Damaraju

2 Answers

4
votes

Your finding is correct but the reason behind it is different.

User defined variables (a config element) are initialized and processed as soon as the test is started i.e. if you have three different User defined variables elements with same variable name but different values in three different thread groups then even before the thread groups are executed all the user defined variables are initialized hence the last processed value will only be retained.

On the other hand if you use a user parameters element (a pre-processor) it is initialized and processed just before that thread is executed. So if you have three different User defined variables elements with same variable name but different values in three different thread groups then each time the thread group is executed the value is processed.

1
votes

!!!!!!!!!!Eureka Found solution for this Problem!!!!!!!!! we can go for an Pre-processor in Jmeter like User-parameter since User Parameter is individual to single thread group unlike User defined variable which is common to a test plan

Add variables with the same name in the user defined vaiables and add it in each thread group.

Is there any other better way to do this thing,as always in java one thing better than other comes our way :)