jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vikrant Sharma <>
Subject Re: How can we pass objects created in one beanshell sampler to another
Date Fri, 30 Jun 2006 13:51:08 GMT
Hi Vitalie,

Thanks for the reply. 

When i try to store the object into a variable (in first beanshell) using vars.put("varname",
"value"); method, it does not complain about anything. 
But when I get it (in second beanshell) using vars.get("varname") method and try to cast it,
it throws error. 
Further  when i dont cast it and try to print it. it just prints the name of that object as
a normal String. SO I think when we set the object in the variable it is just set as a normal
String and not as an object instance.

For the second solution, yes i can serialize the object but as this is the performance script,
storing and loading object's state will incur some more cost.

Thanks & Regards

Vitalie Valache <> wrote: just some ideas..
- maybe you can declare a global variable assign the object value to it and use it by casting
in the second beanshell, not sure if jmeter variable can store objects but why not!

- save object  to a file using serialization if your object is supporting and load it from
your second beanshell.

Any e-mail messages from the National Bank of Moldova are sent in good faith, but shall not
be binding nor construed as constituting any obligation on the part of the Bank.
The information transmitted is intended only for the person or entity to which it is addressed
and may contain confidential and/or privileged material. If you received this in error, please
contact the sender and delete the material from any computer.

To unsubscribe, e-mail:
For additional commands, e-mail:

Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2ยข/min
or less.
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message