jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Can BeanShell execute String.substring or StringBuffer.insert methods ?
Date Wed, 09 Feb 2005 18:10:59 GMT
On Tue, 8 Feb 2005 17:30:54 -0500, Kyle McAbee <k.mcabee@treev.com> wrote:
> Dear JMeter Users:
> 
> Can the BeanShell function execute the String.substring method or StringBuffer.insert
method?

Yes.

> 
> My code examples execute in NetBeans 3.6, but not under JMeter 2.0.2 using BeanShell
2.0 beta 2 (bsh-2.0b2.jar). Below my signature is the code for "BeanShell function tests.jmx".
After that is the jmeter.log output. To see the problem: Put the code in a JMX file, run the
test plan, look at the output in the View Results in Table element.
> 
> The jmeter.log shows errors when open parentheses are parsed. Unfortunately, I have no
idea why this would occur with apparently correct Java code, or how to solve it. (OK, I'll
stop whining now.)
> 

This is most likely because of the commas in the Java method calls. 
Commas are also used to delimit JMeter function parameters, and need
to be prefixed with \  to protect them.

If you want to test a BeanShell script in JMeter, you might find the
BeanShell Sampler useful. The text does not need to be quoted in the
Sampler script - unless you are using a JMeter function call that
includes commas in _its_ parameter(s) ...

[snip]

---------------------------------------------------------------------
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