Skip to main content

Quality Assurance

Capturing API Requests from Postman Using JMeter

Close Up Of Businessman Using A Laptop With Graphs And Charts On A Laptop Computer.

Performance testing is a crucial phase in the API development lifecycle. If you’re using Postman for API testing and want to transition to load testing using Apache JMeter, you’ll be glad to know that JMeter can record your Postman API calls. This blog will guide you through a step-by-step process of capturing those requests seamlessly.

Why Record Postman Requests in JMeter?

Postman is excellent for testing individual API calls manually, while JMeter excels at simulating concurrent users and measuring performance.

Prerequisites:

  • Apache JMeter
  • Postman
  • JDK 8 or later
  • Internet access

Step-by-Step Guide

  1. Launch JMeter and Create a Test Plan: Open JMeter and start by creating a Thread Group under the Test Plan and add the HTTP(S) Test Script Recorder under Non-Test Elements.
    Image11
  2. Add a Recording Controller: Inside your Thread Group, add a Recording Controller and this will collect all the requests captured during the session.
    Image 12
  3. Import the JMeter certificate in postman: Go to Postman > Settings > “Certificates” tab, click and Toggle On for “CA certificates”, locate ApacheJMeterTemporaryRootCA.crt and add.Image 3
  4. Open Postman > navigate to Settings > then go to the Proxy tab. Configure the proxy by setting the port to ‘8888’. Set the proxy server address to ‘https://localhost’ during configuration.Image 4
  5. Start the JMeter Proxy Recorder: Set the port to 8888 in the recorder and hit Start.
    Image 15
  6. Execute API Requests from Postman: Send any API requests from Postman, and you’ll see them appear in the Recording Controller in JMeter. Next, search online for REST APIs that are available for free use. Here, I have taken the example of https://reqres.in/for reference.
    Image 6
  7. Stop the Recording: Click Stop in JMeter’s recorder once you’ve captured all desired traffic.Image 7
  8. Review the Results: Add a Listener like ‘View Results Tree’ under your Thread Group to see the captured request and response data.
    Image 8

Wrapping Up

By recording Postman traffic into JMeter, you’re not only saving time but also setting up your foundation for powerful performance testing. Whether you’re preparing for stress testing or simulating concurrent user traffic, this integration is a valuable step forward.

Happy Testing!!!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Samrudhi Khond

Samrudhi Khond is a technical consultant based in Nagpur, specializing in Quality Assurance. She brings nearly five years of experience in manual testing, as well as performance and load testing. Passionate about sharing her expertise, she is continuously motivated to learn and explore new technologies.

More from this Author

Categories
Follow Us