1

I am trying to run the jmeter test-suites in eclipse.
In my test-suite I am using a BeanShellAssertion to count the number of rows in a csv file.
I have a custom jmeter function to do so.
The script of the BeanShellAssertion is :

String str = "${__CustomFunction("Path to the CSV file")}";
int i = Integer.parseInt(str);
if(i ==0)
{
   Failure = true;
   FailureMessage = "Failed!";
}
return i;

This test-suite works fine when I run it using the jmeter on my local machine.
Only when I try to run it with eclipse, (using the jmeter maven plugin) I see the following error:

jmeter.util.BeanShellInterpreter: Error invoking bsh method: eval Sourced file: inline evaluation of: `` String str = "${__CustomFunction("FilePath")}"; int i = Integ . . . '' : Typed variable declaration : Method Invocation Integer.parseInt

I am wondering if there's some other way to invoke the jmeter functions when executing it using eclipse cause I am sure that the function is correct as I mentioned before that it works fine when the test suite is run using the jmeter on my local machine.

Any help would be appreciated. Thanks.

1
  • Any news on that, was my answer ok, if yes you should accept it, if not please comment. Commented Nov 5, 2012 at 22:43

1 Answer 1

1

Are you sure your custom function jar is visible for the Maven Plugin ?

As when you run it from JMeter, it works , I suppose you have a jar in lib/ext.

So you need to make this jar available to the jmeter maven plugin.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the reply. Sorry for the late reply. Yes the custom jar is visible to the Maven Plugin. I tried a lot to make this work but unfortunately couldn't get it working..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.