DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • Testing Jedis API Using Junit Test Case in Eclipse IDE
  • Spring 5 Web Reactive: Flux, Mono, and JUnit Testing
  • Why Testing is a Long-Term Investment for Software Engineers
  • Integrating Jenkins With Playwright TypeScript: A Complete Guide

Trending

  • After 9 Years, Microsoft Fulfills This Windows Feature Request
  • How to Convert XLS to XLSX in Java
  • Data Quality: A Novel Perspective for 2025
  • Advancing Your Software Engineering Career in 2025
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Testing, Tools, and Frameworks
  4. Steps To Integrate Selenium Test Case With Apache JMeter

Steps To Integrate Selenium Test Case With Apache JMeter

In this article, learn how to integrate selenium test scrips with JMeter for performance testing.

By 
Saranya Shanmugam user avatar
Saranya Shanmugam
·
Jul. 20, 21 · Tutorial
Likes (2)
Comment
Save
Tweet
Share
5.8K Views

Join the DZone community and get the full member experience.

Join For Free

Integrating selenium test cases with JMeter can be done using the following concepts.

  1. Using JUnit Sampler
  2. Using WebDriver Sampler

Pre-Requisites:

  1. Required jars/plugins before we integrate selenium test scripts with Apache JMeter. 
  2. Download the Plugin Manager  Jar File from the website here.
  3. Put the File in the lib/ext directory in JMeter
  4. Then Restart JMeter

1. Using JUnit Sampler

Below are the steps along with a screenshot to perform pre-requisites for JUnit Sampler.

Step 1: Click “Options” and then “Plugins Manager" from Apache JMeter

Apache JMeter

Step 2: Download jpgc-webdriver 2.3 from the website here.

jmeter plugins

Step 3: Copy the lib/ext file and put the file in the lib/ext directory in JMeter folder

Step 4: Restart JMeter.

Refer Below Steps To Perform or Create JUnit Sampler Request

Step 1: Go to Thread Group --->  click on Add ---> click on Sampler --->select  JUnit Request as below shown in the screenshot:

Apache JMeter

The JUnit Request can be viewed as displayed below:

apache JMeter view request

Step 2: Considered we have already a JUnit test case created in Eclipse, to Export JUnit Test case ---> Right Click the JUnit Test case (Created in Eclipse IDE ) ---> Click on the “Export” option as shown below:

Selenium export

Step 3: Select “Jar File” under JAVA folder in Eclipse ---> Click “Next”

Select Jar File

Step 4: Now, Select the JUnit Test case ---> Give the path with (.jar) extension ---> Click “Finish”

Jar file specifications

Step 5: Now, Open Apache JMeter and click on Run  ---> JUnit Request.

To view the results ---> Go to “Thread Group”  ---> Add ---> Listener  ---> View Results Tree

View Results tree

The description of the Result can be viewed in “Sampler result” as displayed:

View result trees

2. Using WebDriver Sampler

Below are the steps to integrate the web driver sampler with Apache JMeter.

Step 1: Right Click Thread Group ---> Add ---> Sampler ---> jp@gc - WebDriver Sampler

WebDriver sampler

The “jp@gc - WebDriver Sampler” can be viewed as displayed

webdriver sampler

Step 2: Type the code given in the Screenshot below 

jp@gc webdriver sampler

Step 3: Save and Run the Test case ---> View The Results in View Results Tree

result tree

This is how we integrate either JUnit Sampler or WebDriver Sampler with Apache JMeter to do performance testing.

Test case Apache JMeter Testing Integration JUnit

Opinions expressed by DZone contributors are their own.

Related

  • Testing Jedis API Using Junit Test Case in Eclipse IDE
  • Spring 5 Web Reactive: Flux, Mono, and JUnit Testing
  • Why Testing is a Long-Term Investment for Software Engineers
  • Integrating Jenkins With Playwright TypeScript: A Complete Guide

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!