Jmeter junit not on sampler menu

737 views Asked by At

I've donwloaded JMeter 3.1 and am trying to run a junit sampler.

Per these instructions jmeter.apache.org/usermanual/junitsampler_tutorial.pdf I've added a ThreadGroup to test plan, i select add->sampler, but do not find Junit.

This is what I see. What am I missing? no jmeter on menu

Here is an example photo I found on the tutorial.
enter image description here

I do have a junit class in a jar in the lib/junit folder.

2

There are 2 answers

0
Dmitri T On

This is weird, my JMeter 3.1 (installation comes with the JUnit Request sampler out of the box.

JMeter JUnit

So please double check the following:

  1. jmeter.log file - normally it contains enough information to guess the problem cause
  2. you should have ApacheJMeter_junit.jar file under "lib/ext" folder of your JMeter installation. If it is not there - most probably something went wrong and your installation is corrupt

Be aware that you can add JUnit support (as well as any other JMeter Plugin) using JMeter Plugins Manager

JMeter Plugins Manager JUnit

0
Walter Laan On

For JMeter 5.0, the JUnit sampler did not appear for me when I incorrectly placed all my JUnit dependency jars in JMeter's lib/junit. It looks like it got stuck parsing all those jars looking for tests.

After placing JUnit dependency jars in JMeter lib folder and only the unit test jar in lib/junit, it worked correctly and JMeter GUI also started a lot faster.

I do have a junit class in a jar in the lib/junit folder.

This may be the problem in you case, if JMeter does not find any tests (or fails to find in my case), the JUnit sampler is simply not added to the UI