SlideShare a Scribd company logo
1 of 16
Download to read offline
12 Steps to API Load
Testing with Apache
JMeter
Dmitry Sotnikov
VP, Cloud at WSO2
Apache JMeter and API load testing
● Apache JMeter™ is a popular free, open source software, designed
to load test functional behavior and measure performance
● It was originally designed for testing Web applications but has
since expanded to other test functions
● Load-testing your APIs allow you to know in advance what kind of
load from subscribers and applications your gateway can sustain
Action Plan
● Set up API and install Apache JMeter
● Create the test plan and call request
● Add listener to collect results
● Test single call and then scale up
● Do multiaccount and distributed testing
This presentation will guide you through these steps in detail
1. Publish your API and subscribe
to it
● If using WSO2 API Cloud, get yourself a free trial and follow these
tutorials:
2. Download and launch JMeter
1. Download from: http://jmeter.apache.org/download_jmeter.cgi
2. Unzip the package
3. Start Apache JMeter:
○ sh jmeter.sh on Linux or Mac
○ jmeter.bat on Windows.
3. Add your test
● Right click the Test Plan node and click the Add / Threads (Users) /
Thread Group on the shortcut menu:
4. Add API call request
● Right click the Thread Group and click the Add / Sampler / HTTP
Request on the shortcut menu:
5. Copy over server name and path
● Invoke API in API store’s API console and copy over Server Name
and Path to HTTP Request in JMeter:
6. Add authorization header
1. Right click the HTTP Request
node and, on the shortcut
menu, click Add / Config
Element / HTTP Header
Manager
2. In the HTTP Header Manager,
click the Add button. A new
row will get added to the table
of Headers Stored in the
Header Manager
3. Set Name to Authorization
4. And copy the Bearer part from
API Console
7. Add listener to see results
● Right click the Thread Group node and, on the shortcut menu, click
Add / Listener / View Results Tree:
8. Test the API
● Click the Run button and verify that the API call was successful. If
prompted to save the configuration, do so.
9. Increase the load
● To be able to test at larger load, go back to the Thread Group node,
and increase the Number of Threads and Loop Count:
10. See when and why calls fail
● Check out the Response data tab
to see why
● Limits imposed by Subscription
Tier you set for the API (e.g. 20
calls / minute) result in “You have
exceeded your quota”
● Limits based on your API Cloud
subscription level lead to “Your
request was blocked due to
exceeding the allocated quota.
Please contact the API Store
owner to resolve this.”
11. (Optional) Simulate more
subscribers
1. Create another subscriber account or another application in API
Cloud
2. Subscribe to the API
3. Create another HTTP request in Apache JMeter with this new
application’s authorization header
12. (Optional) Distributed load
1. Deploy Apache JMeter on multiple machines
2. Copy the saved test plan
3. Run the following command line or the corresponding .bat
command on Windows:
sh jmeter.sh -n -t TestPlan.jmx -l Test1.jtl
where -t specifies the saved Test Plan file and -l specifies the output
file for the responses
API Management Options on the Market
Hosted Service:
WSO2 API Cloud free trial at :
● http://wso2.com/cloud/api-cloud
Open Source:
WSO2 API Manager free download at :
● http://wso2.com/api-management/try-it/

More Related Content

What's hot

What's hot (20)

POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
 
RESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and JenkinsRESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and Jenkins
 
Basic of jMeter
Basic of jMeter Basic of jMeter
Basic of jMeter
 
Accelerate Quality with Postman - Basics
Accelerate Quality with Postman - BasicsAccelerate Quality with Postman - Basics
Accelerate Quality with Postman - Basics
 
Playwright: A New Test Automation Framework for the Modern Web
Playwright: A New Test Automation Framework for the Modern WebPlaywright: A New Test Automation Framework for the Modern Web
Playwright: A New Test Automation Framework for the Modern Web
 
Junit
JunitJunit
Junit
 
Testing your APIs Performance.pptx
Testing your APIs Performance.pptxTesting your APIs Performance.pptx
Testing your APIs Performance.pptx
 
Performance testing presentation
Performance testing presentationPerformance testing presentation
Performance testing presentation
 
Testing microservices with rest assured
Testing microservices with rest assuredTesting microservices with rest assured
Testing microservices with rest assured
 
API Testing for everyone.pptx
API Testing for everyone.pptxAPI Testing for everyone.pptx
API Testing for everyone.pptx
 
Observability
ObservabilityObservability
Observability
 
B4USolution_API-Testing
B4USolution_API-TestingB4USolution_API-Testing
B4USolution_API-Testing
 
Automated Test Framework with Cucumber
Automated Test Framework with CucumberAutomated Test Framework with Cucumber
Automated Test Framework with Cucumber
 
Api testing
Api testingApi testing
Api testing
 
Performance Testing With Jmeter
Performance Testing With JmeterPerformance Testing With Jmeter
Performance Testing With Jmeter
 
Automation Testing
Automation TestingAutomation Testing
Automation Testing
 
Why Should we use Microsoft's Playwright
Why Should we use Microsoft's PlaywrightWhy Should we use Microsoft's Playwright
Why Should we use Microsoft's Playwright
 
Introduction to Software Test Automation
Introduction to Software Test AutomationIntroduction to Software Test Automation
Introduction to Software Test Automation
 
API Testing with Frisby and Mocha
API Testing with Frisby and MochaAPI Testing with Frisby and Mocha
API Testing with Frisby and Mocha
 
Load testing jmeter
Load testing jmeterLoad testing jmeter
Load testing jmeter
 

Viewers also liked

WSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and AdoptionWSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and Adoption
WSO2
 

Viewers also liked (10)

WSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and AdoptionWSO2 Test Automation Framework : Approach and Adoption
WSO2 Test Automation Framework : Approach and Adoption
 
Electronic Discovery 101 - From ESI to the EDRM
Electronic Discovery 101 - From ESI to the EDRMElectronic Discovery 101 - From ESI to the EDRM
Electronic Discovery 101 - From ESI to the EDRM
 
Testing APIs in the Cloud
Testing APIs in the CloudTesting APIs in the Cloud
Testing APIs in the Cloud
 
eDiscovery Perspective
eDiscovery PerspectiveeDiscovery Perspective
eDiscovery Perspective
 
E Discovery General E Discovery Presentation
E Discovery General E Discovery PresentationE Discovery General E Discovery Presentation
E Discovery General E Discovery Presentation
 
The Technologist’s Guide to eDiscovery Law for Dummies
The Technologist’s Guide to eDiscovery Law for DummiesThe Technologist’s Guide to eDiscovery Law for Dummies
The Technologist’s Guide to eDiscovery Law for Dummies
 
Ediscovery 101
Ediscovery 101Ediscovery 101
Ediscovery 101
 
Cloud api
Cloud apiCloud api
Cloud api
 
Cloud APIs and Cloud Frameworks
Cloud APIs and Cloud FrameworksCloud APIs and Cloud Frameworks
Cloud APIs and Cloud Frameworks
 
The Concise Guide to E-Discovery
The Concise Guide to E-DiscoveryThe Concise Guide to E-Discovery
The Concise Guide to E-Discovery
 

Similar to 12 Steps to API Load Testing with Apache JMeter

Jmeter proxy step_by_step
Jmeter proxy step_by_stepJmeter proxy step_by_step
Jmeter proxy step_by_step
Kapil Chawla
 

Similar to 12 Steps to API Load Testing with Apache JMeter (20)

Perfromane Test Tool jmeter
Perfromane Test Tool jmeterPerfromane Test Tool jmeter
Perfromane Test Tool jmeter
 
Jmeter
JmeterJmeter
Jmeter
 
Google App Engine tutorial
Google App Engine tutorialGoogle App Engine tutorial
Google App Engine tutorial
 
LoadUI web performance testing tool
LoadUI web performance testing toolLoadUI web performance testing tool
LoadUI web performance testing tool
 
Load ui web Load Testing Open source Performance Testing tool Learn Load UI W...
Load ui web Load Testing Open source Performance Testing tool Learn Load UI W...Load ui web Load Testing Open source Performance Testing tool Learn Load UI W...
Load ui web Load Testing Open source Performance Testing tool Learn Load UI W...
 
JMeter & ColdFusion
JMeter & ColdFusion JMeter & ColdFusion
JMeter & ColdFusion
 
Jmeter proxy step_by_step
Jmeter proxy step_by_stepJmeter proxy step_by_step
Jmeter proxy step_by_step
 
Automation - Apache JMeter
Automation - Apache JMeterAutomation - Apache JMeter
Automation - Apache JMeter
 
Glassfish JEE Server Administration - Module 4 Load Balancer
Glassfish JEE Server Administration - Module 4 Load BalancerGlassfish JEE Server Administration - Module 4 Load Balancer
Glassfish JEE Server Administration - Module 4 Load Balancer
 
Perofrmance testing and apache jmeter
Perofrmance testing and apache jmeterPerofrmance testing and apache jmeter
Perofrmance testing and apache jmeter
 
API Testing following the Test Pyramid
API Testing following the Test PyramidAPI Testing following the Test Pyramid
API Testing following the Test Pyramid
 
Hands-On Lab: From Zero to Compliance Using CA Software Asset Management
Hands-On Lab: From Zero to Compliance Using CA Software Asset ManagementHands-On Lab: From Zero to Compliance Using CA Software Asset Management
Hands-On Lab: From Zero to Compliance Using CA Software Asset Management
 
Module 4: Introduction to ASP.NET 3.5 (Material)
Module 4: Introduction to ASP.NET 3.5 (Material)Module 4: Introduction to ASP.NET 3.5 (Material)
Module 4: Introduction to ASP.NET 3.5 (Material)
 
Pdf jmeter
Pdf jmeterPdf jmeter
Pdf jmeter
 
Performance Testing REST APIs
Performance Testing REST APIsPerformance Testing REST APIs
Performance Testing REST APIs
 
Best Jmeter Interview Questions- Prepared by Working Professionals
Best Jmeter Interview Questions- Prepared by Working ProfessionalsBest Jmeter Interview Questions- Prepared by Working Professionals
Best Jmeter Interview Questions- Prepared by Working Professionals
 
Utilizando Proxy no Jmeter Passo a Passo
Utilizando Proxy no Jmeter Passo a PassoUtilizando Proxy no Jmeter Passo a Passo
Utilizando Proxy no Jmeter Passo a Passo
 
1 app 2 developers 3 servers
1 app 2 developers 3 servers1 app 2 developers 3 servers
1 app 2 developers 3 servers
 
HP ALM QC
HP ALM QCHP ALM QC
HP ALM QC
 
B4usolution performance testing
B4usolution performance testingB4usolution performance testing
B4usolution performance testing
 

More from WSO2

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Fueling the Digital Experience Economy with Connected Products
Fueling the Digital Experience Economy with Connected ProductsFueling the Digital Experience Economy with Connected Products
Fueling the Digital Experience Economy with Connected Products
WSO2
 
A Reference Methodology for Agile Digital Businesses
 A Reference Methodology for Agile Digital Businesses A Reference Methodology for Agile Digital Businesses
A Reference Methodology for Agile Digital Businesses
WSO2
 

More from WSO2 (20)

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Accelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with PlatformlessAccelerating Enterprise Software Engineering with Platformless
Accelerating Enterprise Software Engineering with Platformless
 
How to Create a Service in Choreo
How to Create a Service in ChoreoHow to Create a Service in Choreo
How to Create a Service in Choreo
 
Ballerina Tech Talk - May 2023
Ballerina Tech Talk - May 2023Ballerina Tech Talk - May 2023
Ballerina Tech Talk - May 2023
 
Platform Strategy to Deliver Digital Experiences on Azure
Platform Strategy to Deliver Digital Experiences on AzurePlatform Strategy to Deliver Digital Experiences on Azure
Platform Strategy to Deliver Digital Experiences on Azure
 
GartnerITSymSessionSlides.pdf
GartnerITSymSessionSlides.pdfGartnerITSymSessionSlides.pdf
GartnerITSymSessionSlides.pdf
 
[Webinar] How to Create an API in Minutes
[Webinar] How to Create an API in Minutes[Webinar] How to Create an API in Minutes
[Webinar] How to Create an API in Minutes
 
Modernizing the Student Journey with Ethos Identity
Modernizing the Student Journey with Ethos IdentityModernizing the Student Journey with Ethos Identity
Modernizing the Student Journey with Ethos Identity
 
Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...
Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...
Choreo - Build unique digital experiences on WSO2's platform, secured by Etho...
 
CIO Summit Berlin 2022.pptx.pdf
CIO Summit Berlin 2022.pptx.pdfCIO Summit Berlin 2022.pptx.pdf
CIO Summit Berlin 2022.pptx.pdf
 
Delivering New Digital Experiences Fast - Introducing Choreo
Delivering New Digital Experiences Fast - Introducing ChoreoDelivering New Digital Experiences Fast - Introducing Choreo
Delivering New Digital Experiences Fast - Introducing Choreo
 
Fueling the Digital Experience Economy with Connected Products
Fueling the Digital Experience Economy with Connected ProductsFueling the Digital Experience Economy with Connected Products
Fueling the Digital Experience Economy with Connected Products
 
A Reference Methodology for Agile Digital Businesses
 A Reference Methodology for Agile Digital Businesses A Reference Methodology for Agile Digital Businesses
A Reference Methodology for Agile Digital Businesses
 
Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)
Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)
Workflows in WSO2 API Manager - WSO2 API Manager Community Call (12/15/2021)
 
Lessons from the pandemic - From a single use case to true transformation
 Lessons from the pandemic - From a single use case to true transformation Lessons from the pandemic - From a single use case to true transformation
Lessons from the pandemic - From a single use case to true transformation
 
Adding Liveliness to Banking Experiences
Adding Liveliness to Banking ExperiencesAdding Liveliness to Banking Experiences
Adding Liveliness to Banking Experiences
 
Building a Future-ready Bank
Building a Future-ready BankBuilding a Future-ready Bank
Building a Future-ready Bank
 
WSO2 API Manager Community Call - November 2021
WSO2 API Manager Community Call - November 2021WSO2 API Manager Community Call - November 2021
WSO2 API Manager Community Call - November 2021
 
[API World ] - Managing Asynchronous APIs
[API World ] - Managing Asynchronous APIs[API World ] - Managing Asynchronous APIs
[API World ] - Managing Asynchronous APIs
 
[API World 2021 ] - Understanding Cloud Native Deployment
[API World 2021 ] - Understanding Cloud Native Deployment[API World 2021 ] - Understanding Cloud Native Deployment
[API World 2021 ] - Understanding Cloud Native Deployment
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

12 Steps to API Load Testing with Apache JMeter

  • 1. 12 Steps to API Load Testing with Apache JMeter Dmitry Sotnikov VP, Cloud at WSO2
  • 2. Apache JMeter and API load testing ● Apache JMeter™ is a popular free, open source software, designed to load test functional behavior and measure performance ● It was originally designed for testing Web applications but has since expanded to other test functions ● Load-testing your APIs allow you to know in advance what kind of load from subscribers and applications your gateway can sustain
  • 3. Action Plan ● Set up API and install Apache JMeter ● Create the test plan and call request ● Add listener to collect results ● Test single call and then scale up ● Do multiaccount and distributed testing This presentation will guide you through these steps in detail
  • 4. 1. Publish your API and subscribe to it ● If using WSO2 API Cloud, get yourself a free trial and follow these tutorials:
  • 5. 2. Download and launch JMeter 1. Download from: http://jmeter.apache.org/download_jmeter.cgi 2. Unzip the package 3. Start Apache JMeter: ○ sh jmeter.sh on Linux or Mac ○ jmeter.bat on Windows.
  • 6. 3. Add your test ● Right click the Test Plan node and click the Add / Threads (Users) / Thread Group on the shortcut menu:
  • 7. 4. Add API call request ● Right click the Thread Group and click the Add / Sampler / HTTP Request on the shortcut menu:
  • 8. 5. Copy over server name and path ● Invoke API in API store’s API console and copy over Server Name and Path to HTTP Request in JMeter:
  • 9. 6. Add authorization header 1. Right click the HTTP Request node and, on the shortcut menu, click Add / Config Element / HTTP Header Manager 2. In the HTTP Header Manager, click the Add button. A new row will get added to the table of Headers Stored in the Header Manager 3. Set Name to Authorization 4. And copy the Bearer part from API Console
  • 10. 7. Add listener to see results ● Right click the Thread Group node and, on the shortcut menu, click Add / Listener / View Results Tree:
  • 11. 8. Test the API ● Click the Run button and verify that the API call was successful. If prompted to save the configuration, do so.
  • 12. 9. Increase the load ● To be able to test at larger load, go back to the Thread Group node, and increase the Number of Threads and Loop Count:
  • 13. 10. See when and why calls fail ● Check out the Response data tab to see why ● Limits imposed by Subscription Tier you set for the API (e.g. 20 calls / minute) result in “You have exceeded your quota” ● Limits based on your API Cloud subscription level lead to “Your request was blocked due to exceeding the allocated quota. Please contact the API Store owner to resolve this.”
  • 14. 11. (Optional) Simulate more subscribers 1. Create another subscriber account or another application in API Cloud 2. Subscribe to the API 3. Create another HTTP request in Apache JMeter with this new application’s authorization header
  • 15. 12. (Optional) Distributed load 1. Deploy Apache JMeter on multiple machines 2. Copy the saved test plan 3. Run the following command line or the corresponding .bat command on Windows: sh jmeter.sh -n -t TestPlan.jmx -l Test1.jtl where -t specifies the saved Test Plan file and -l specifies the output file for the responses
  • 16. API Management Options on the Market Hosted Service: WSO2 API Cloud free trial at : ● http://wso2.com/cloud/api-cloud Open Source: WSO2 API Manager free download at : ● http://wso2.com/api-management/try-it/