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
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Secure Your Web Applications With Facial Authentication
  • Your API Authentication Isn’t Broken; It’s Quietly Failing in These 6 Ways
  • The ID That Costs Millions: Why API Authorization Failures Keep Winning
  • Understanding Custom Authorization Mechanisms in Amazon API Gateway and AWS AppSync

Trending

  • Solving the Mystery: Why Java RSS Grows in Docker on M1 Macs
  • Ten Years of Beam: From Google's Dataflow Paper to 4 Trillion Events at LinkedIn
  • Stop Writing Dialect-Specific SQL: A Unified Query Builder for Node.js
  • 11 Agentic Testing Tools to Know in 2026
  1. DZone
  2. Data Engineering
  3. Databases
  4. JMeter: Setup for Load Testing With Certificate-based Authentication

JMeter: Setup for Load Testing With Certificate-based Authentication

Steps to do load testing using JMeter on endpoints that required client authentication based on a security certificate. Let's get started!

By 
Ananda Joardar user avatar
Ananda Joardar
·
Aug. 04, 21 · Tutorial
Likes (1)
Comment
Save
Tweet
Share
15.3K Views

Join the DZone community and get the full member experience.

Join For Free

Introduction

JMeter is a widely accepted tool for doing load testing for API or Web applications. As part of the implementation of API, apart from functional requirements, we also need to take care of many non-functional requirements (NFR). Like maintaining a threshold limit for response time. These NFRs are often considered as a parameter to measure customer experience with the developed API or Web Application. This is always recommended to plan for some extent of performance testing and load profiling before releasing the API in Production. JMeter is a preferred tool that can be used to measure the performance of the API or Web Application and publish a report measuring various performance parameters. My experience with multiple Mulesoft API implementations caused me to get involved in such kind of performance testing using JMeter. Many times API or Web Applications are developed with security measures such as Client authentication using a security certificate. In this blog, we have discussed the steps required to set up JMeter where every client needs a security certificate for authentication. Let's get into the details.

Steps to Setup JMeter

1.  Download JMeter from https://jmeter.apache.org/download_jmeter.cgi. Download the zip file for the Windows machine:

Downloading JMeter For Windows

2. Unzip the folder. Then go to bin and from there open the command prompt. On command prompt from the bin directory type jmeter, and then press enter:

JMeter Directory in Command Prompt

3. This will open the JMeter console:

JMeter Console4. Add thread group under Thread plan:

Adding Thread Group

5. Set Number of Threads and Ramp-up period based on load test requirement and environment:

Setting Number of Threads and Ramp-Up Period

6. Add Sampler for an HTTP request:

Add Sampler for an HTTP Request

7. Configure HTTP request with Endpoint, protocol, method, and payload:

Configuring HTTP Request

8. To view the results, add some listeners and select the prebuilt result set:

Add Listeners and Select Prebuilt Result

9. Similarly, add other result dashboard:

Adding Other Result Dashboard

10. Add the security certificate for SSL map for client authentication as follows: 

Go to Options > SSL Manager.

Adding Security Certificate for SSL Map

11.  Select the certificate from the file directory:

Selecting Certificate

12. Please note the first time you need to provide the certificate password.

13. To add HTTP header, add HTTP Header Manager:

Adding HTTP Header Manager

14.  Set the HTTP header as follow:

Setting the HTTP Header

15. Now run the test by clicking on the start button from the top menu bar (Green triangle):

Running Test From Start Button

16. Check the View Result Tree view:

View Result Tree View

17. Check Summary Report view:

Check Summary Report View

18. Check Graph Results view:Check Graph Results View

Conclusion

We have used this JMeter setup for Mulesoft API (in Mule 4) testing for our purpose. However, the same setup can be used for any API or Web Application Testing with JMeter where invoking target HTTP URL invocation required a security certificate to complete the handshaking. So now it is all set to use JMeter for performance profiling of your API or Web Application. Hope this will help.

Load testing authentication Web application API

Opinions expressed by DZone contributors are their own.

Related

  • Secure Your Web Applications With Facial Authentication
  • Your API Authentication Isn’t Broken; It’s Quietly Failing in These 6 Ways
  • The ID That Costs Millions: Why API Authorization Failures Keep Winning
  • Understanding Custom Authorization Mechanisms in Amazon API Gateway and AWS AppSync

Partner Resources

×

Comments

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

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

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 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook