1

I am new to JMeter and trying out certain sample code as part of my POC's. My requirement is pretty simple, I just need to attach a zip file to a SOAP message and fire the request. But to create the SOAP message we already have a framework that needs to be used. Now the problem I am facing is to include the framework JARs. I tried to add the library files into the project and create a JAR and paste it in /lib/ext folder and also by putting them in the class path. None of this works.

How do you use any existing framework JARs with the custom code you write for JMeter??

1 Answer 1

2
  1. Drop your jar to /lib folder of your JMeter installation
  2. Restart JMeter. JMeter doesn't pick up new libraries or configuration file changes dynamically.
  3. In Beanshell or JSR223 Sampler refer to your jar classes as:

    import com.yourcompany.package.SomeClass;
    import com.yourcompany.package.SomeMessage;
    
    SomeClass myClass = new SomeClass(parameter1, parameter2);
    SomeMessage message = myClass.createMessage();
    message.send();
    

See WebSocket Testing With Apache JMeter guide as an example of using external jars in JMeter.

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

Comments

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.