BreadcrumbHomeResourcesBlog How To Convert Your Postman API Tests To JMeter For Scaling August 29, 2023 How to Convert Your Postman API Tests to JMeter for ScalingAPI TestingMany test engineers use Postman for API testing automation. They discover endpoints, make requests, create test data, run regression testing, implement continuous integration of API testing by using Newman and much more. However, Postman has certain testing limitations. Developers, DevOps and QA engineers who want to gain more load testing abilities can convert their Postman tests to JMeter. This blog post will explain when it is recommended to convert Postman to JMeter, and a step by step explanation of how to do it.Table of ContentsPostman API Testing LimitationsWhen to Convert Postman Tests to JMeter TestsHow to Convert Postman API Tests to JMeter TestsStep 2 - Prepare Postman for Recording Step 3 - Record Your TestsTips, Tricks and Limitations When Converting Postman to JMeterTable of Contents1 - Postman API Testing Limitations2 - When to Convert Postman Tests to JMeter Tests3 - How to Convert Postman API Tests to JMeter Tests4 - Step 2 - Prepare Postman for Recording 5 - Step 3 - Record Your Tests6 - Tips, Tricks and Limitations When Converting Postman to JMeterBack to topPostman API Testing LimitationsScalabilityPostman tests don’t scale. If you have many requests in your collection, Postman/Newman will be executing them with 1 thread (user) and sequentially, instead of with multiple threads and in parallel.Performance Testing CapabilitiesPostman is not suitable for API performance testing due to scalability limitations. Performance tests require running tests for multiple threads (users) at the same time, to check that your system doesn’t break under heavy loads.Back to topWhen to Convert Postman Tests to JMeter TestsYou may want to convert your existing Postman tests to JMeter to get the benefits of:Multithreaded executionObtaining performance metrics for your APIGetting advanced reporting and correlating increasing load with the increasing response time, number of errors, etc. Finding the bottlenecks and slowest API endpointsBack to topHow to Convert Postman API Tests to JMeter TestsHere are the steps to convert your existing Postman tests into JMeter:Step 1 - Prepare JMeter for RecordingJMeter comes with an HTTP(S) Test Script Recorder that acts as a proxy for the browser (or any other application that uses the HTTP protocol and supports proxy). Therefore, you can use it for intercepting requests generated by the browser. In our case, you can use it to intercept Postman, and convert the requests to HTTP Request samplers.JMeter configuration is fairly simple—especially if you use the JMeter Templates Feature:Go to the JMeter main menu and choose File -> Templates -> Recording and click “Create”.Select HTTP(S) Test Script Recorder and click “Start”.Supply your API host so JMeter will put it under HTTP Request Defaults. For this demo we’ll use JMeter's official website: https://jmeter.apache.org/.Back to topStep 2 - Prepare Postman for Recording First, import the JMeter certificate into Postman. When you launch JMeter’s HTTP(S) Test Script Recorder, JMeter generates a self-signed certificate that allows JMeter to decrypt HTTPS requests. The file is called ApacheJMeterTemporaryRootCA.crt and it will begin generating under the “bin” folder of your JMeter installation. Open the Postman settings and to to “Certificates” tabToggle On for “CA certificates” and locate ApacheJMeterTemporaryRootCA.crtThat’s it, now Postman will use JMeter’s certificate and JMeter will be able to decrypt captured requests.Configure Postman to Use JMeter as the ProxyNow you need to “tell” Postman to send requests via JMeter’s HTTP(S) Test Script Recorder.Go to Postman’s settings and open the “Proxy” tab.Under Proxy configurations for sending requests tick “Add a custom proxy configuration” box.Select both the “HTTP” and “HTTPS” protocols.Use “localhost” as the proxy server (if you have JMeter running on the different host—use that host IP address or DNS hostname instead).Use “8888” as the proxy port.Back to topStep 3 - Record Your TestsCongratulations! Postman and JMeter are finally connected. When you start your request or collection, JMeter will capture it and generate a HTTP Request sampler per request. If there are any HTTP Headers present JMeter will add a HTTP Header Manager to add the headers to the request.Here is a small simple demo of how it should work:Back to topTips, Tricks and Limitations When Converting Postman to JMeterNewman Command-line RecordingWindows operating system proxy settings are respected if you want to record your Newman tests on Windows. Therefore, it’s sufficient to perform the setup in Internet Explorer or Chrome browsers. This will set the system-wide proxy which will be used by Newman. For Linux/Unix/MacOS the proxy can be supplied via HTTP_PROXY environment variable like:HTTP_PROXY=http://localhost:8888 && newman -c your_collection.jsonBlazeMeter Proxy RecorderInstead of local JMeter proxy you can use the cloud-based BlazeMeter Proxy Recorder which:Simplifies certificate creation, especially when it comes to recording mobile applications traffic.Has feature of automated correlation of dynamic parameters. See the How to Cut Your JMeter Scripting Time by 80% article for more details.LimitationsRemember that this approach is only suitable for recording requests only. Any scripts that you have defined under the “Pre-req.” or “Tests” tabs in Postman will not be considered. So, if you have test data preparation or assertion logic you will need to replicate it using JSR223 Test Elements and Groovy language, like I’ve described in the Scripting JMeter Assertions in Groovy - A Tutorial article.Run your JMeter Test with BlazeMeter to get even more scalability, more reporting, advanced integrations, and more. Start testing for free today!Start Testing NowBack to top