The User Defined Variables is a Configuration element, and as such is
best used for variables that don't change during the run.

On 13/06/07, jada <[EMAIL PROTECTED]> wrote:

Hello all,

I don't know when I should use "User Parameters" vs. "User Defined
Variables"?
I just want to declare a variable so that I can use it for other elements in
the test plan.
Below is what I see in testing both cases:

Test 1 using User Parameters:

Thread Group (1 thread, 2 loops)
- HTTP Cookie Manager
- User Parameters
   Name: randomfoo
   User_1: ${__log(randomfoo = ${__Random(0,60,randomfoo)},OUT)}
- HTTP Request
- Test Action (pause 5 sec)

Console output:
Log: Thread Group 1-1 : randomfoo = 22
Log: Thread Group 1-1 : randomfoo = 7

Test 2 using User Defined Variables with the same settings:

Thread Group (1 thread, 2 loops)
- HTTP Cookie Manager
- User Defined Variables
   Name: randomfoo
   Value: ${__log(randomfoo = ${__Random(0,60,randomfoo)},OUT)}
- HTTP Request
- Test Action (pause 5 sec)

Console output (weird):
Log: Thread-3 : randomfoo = 42
Log: Thread Group 1-1 : randomfoo = 12
Log: Thread Group 1-1 : randomfoo = 45
Log: Thread Group 1-1 : randomfoo = 43
Log: Thread Group 1-1 : randomfoo = 56

Please note that I only ran each test once. Test 1 output looks reasonable
but Test 2 output really looks weird as if it was run twice and it also had
another thread (ie. Thread-3) unexpectedly.

Can anyone explain this? In what case should I use which one? What is the
right way to declare a variable and use it later?

Thanks.
Jada
--
View this message in context: 
http://www.nabble.com/User-Defined-Variables-vs.-User-Parameters-tf3916006.html#a11103630
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to