jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anurodh Jain <anuro...@aztec.soft.net>
Subject FW: Beanshell Scripting
Date Tue, 05 Jul 2005 05:18:20 GMT


-----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@gb.unisys.com]
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@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org

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

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


Mime
View raw message