Junit/Integration Testing with Jmeter: In this tutorial, we will see Junit test cases are executed in Jmeter. Jmeter is one of the best Open-source tools for performance testing but Jmeter is also supporting integration testing like executing Junit test cases with copying your testing into the JMeter folder.

How to Run your test cases: 

  • First, download the Jmeter from https://jmeter.apache.org/download_jmeter.cgi
  • Then get your Junit Jar Files and paste it in JMETER_HOME/lib/junit/ folder
  • Start your Jmeter and Add Thread Group 
  • Add Junit Sampler From Samplers
  • In Junit Sampler it will show your class name in drop-down like below 

Junit-Integration-Testing-with-Jmeter

  • Select your class from the drop-down or you can use package filter for filtering your classes 
  • After selecting the class in next drop down it will show you all available test cases in that class 

Junit-Integration-with-Jmeter

  • You need to add new sampler for each method in Class
  • Execute the test results like this

Junit-Integration

 

Note: If you test cases are designed in Junit 4 version then don’t forget to check the checkbox to show your Methods 

Jmeter-Testing-Junit

Thanks

Also Read: How to Run JMeter Samplers Defined Percentage

Junit/Integration Testing with Jmeter

Leave a Reply

Your email address will not be published. Required fields are marked *