On Tue, 8 Feb 2005 17:30:54 -0500, Kyle McAbee <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to