5

Is there a way to execute java class from jmeter? I've packaged my class with maven assembly and put it in the lib folder of JMETER_HOME. Then I created BSF Listener inside my test case and wrote :

import my.package.name.App;

my.package.name.App app = new my.package.name.App("argument1", "argument2");

Is there another way to execute java class or whatever maybe with java -jar call the jar directly , this class basically creates one big file from the smaller files, which locations are provided by jmeter so it needs to be included in the test because its the part of the flow.

1 Answer 1

3

Try BSF Sampler instead of BSF Listener, in scripting language field select beanshell and it will work like a charm.

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

2 Comments

Wouldn't that be the same as Beanshell Sampler?
For anyone still looking for answer after so many years just like me, you can use JSR223 Sampler. dzone.com/articles/…

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.