Hi,
On Thu, Feb 23, 2012 at 4:07 PM, sebb <[email protected]> wrote: > On 23 February 2012 23:37, Nirodha Pramod <[email protected]> wrote: > > Hi, > > > > I want to test a session enabled axis2 service with Jmeter. There's an > > special java client have written to test this. I want invoke that class > > within jmeter.I tried with BShell sampler. But I get an error when the > test > > starts. > > > > ERROR - jmeter.util.BeanShellInterpreter: Error invoking bsh method: > eval In > > file: inline evaluation of: ``import java.text.SimpleDateFormat; import > > java.util.Calendar; import java.util.H . . . '' Encountered "," at line > > 116, column 23. > > So what is at line 116? > Inside beanshell line 116 is, Map<String, String> contextMap = new HashMap<String, String>(); > > > Is there any other sampler I can use for this? > > Not without writing some Java code. > > You could use the Java Sampler - this would mean implementing the > appropriate interface. > > It's possible to use BeanShell to write very complicated scripts, but > they can be tricky to debug. > > I suggest you write a wrapper for the test code that you can just call > as a method that returns a string. > > So the BeanShell code would just be: > > return perform_sample(p1, p2, p3); > So lets say My class is 'SessionClient' and the method is 'execute' . Do I have to create a object of that class inside beanshell and invoke 'execute'.? Or else how should I do it? > > The method should accept string parameters for all the items that need > to vary between tests. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- *Nirodha Gallage* Software Engineer, QA. WSO2 Inc.: http://wso2.com/ Email: [email protected] Mobile: +94716429078
