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
Newsletter
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
  • Delegated Transport, Forked Authorization: Where Chat and AI-Agent Integrations Actually Break
  • 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

Trending

  • Designing the Runtime Layer for Stateful AI Agents: Where Agent Substrate Fits
  • Full-Text Search Meets the Graph: Apache Lucene Inside Neo4j
  • Beyond the Wall of Charts: How Advanced Observability Displaced the Telemetry Dashboard
  • Designing a Polling Pipeline for Rate-Limited APIs Without Losing Data

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  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
·
Aug. 04, 21 · Tutorial
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
15.8K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

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
  • Delegated Transport, Forked Authorization: Where Chat and AI-Agent Integrations Actually Break
  • 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

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • 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