« Return to Thread: FW: Beanshell Scripting

FW: Beanshell Scripting

by Anurodh Jain :: Rate this Message:

Reply to Author | View in Thread



-----Original Message-----
From: Anurodh Jain
Sent: Monday, July 04, 2005 4:57 PM
To: JMeter Users List
Subject: RE: Beanshell Scripting


thankx john,
 thats should work. If I wanna obtain the number of threads so I would just
do :
 var.get("num_threads") right.

One more thing I wanna know is : If i am using a Beanshell script to test an
application,
Is there is way where I can time only the selective part of the Script for
Load testing.
I want only some part of the the beanshell script for testing the load
generated by my
application.
 How can we go about dong this? Any idea.

With Regards
Anurodh




-----Original Message-----
From: Sweet-Escott, John [mailto:john.sweetescott@...]
Sent: Monday, July 04, 2005 3:01 PM
To: JMeter Users List
Subject: RE: Beanshell Scripting


Try this

import org.apache.jmeter.threads.JMeterContext;
import org.apache.jmeter.threads.JMeterContextService;
import org.apache.jmeter.threads.JMeterVariables;
JMeterContext jmctx = JMeterContextService.getContext();
JMeterVariables vars = jmctx.getVariables();

fooval = vars.get("foo");

vars.put("bar","barval");


John


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@...
For additional commands, e-mail: jmeter-user-help@...

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@...
For additional commands, e-mail: jmeter-user-help@...

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@...
For additional commands, e-mail: jmeter-user-help@...

 « Return to Thread: FW: Beanshell Scripting