SlideShare a Scribd company logo
1 of 4
Download to read offline
Case	
  Study	
  Rest	
  API	
  Performance	
  Testing	
  with	
  JMeter	
  on	
  EC2	
  Cloud	
  
India	
  Office	
  Address:	
  Waviz	
  Tech.	
  (P)	
  Ltd.	
  	
  D-­77,	
  Bassment-­8,	
  Sector-­63,	
  Noida-­201301	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
Phone:	
  +91-­120-­429-­5252	
  |	
  www.waviz.com|	
  	
  info@waviz.com	
  
	
  
	
  
	
  
	
  
Objective:
To test the REST API’s performance, which is deployed on EC2 Cloud. To
perform ‘Stress Test’ on the server by simulating 5000 concurrent requests.
Why we have chosen JMeter:
The leader of the pack in awareness is probably Apache JMeter. This is an
open-source Java application whose key feature is a powerful and complete
GUI which you use to create test plans. A test plan is composed by test
components which define every piece of the test such as:
• Threads that are used to inject load
• Parametrizing HTTP requests used in the test
• Adding listeners, which are widget-like test components used to display
results in different ways
Before selecting a tool, keep in mind different parameters such as the tool
should be cost effective, easy to use, easy to configure & easily available third
party plug in, if needed. Here we will discuss JMeter as it has all the stated
features in it, as well as it has more support from well-established open
source community as compared to LoadUI. JMeter can be used to gather
information related to API request, response time of server & resource
utilization of server for a given number of threads in following ways:
Request/Response time of RESTful APIs
• TPS (transaction per second)
• Aggregate time of all virtual users
• Request-response time graph of APIs
• Active thread in a given time
• View results in tree (actual results will be shown)
Case	
  Study	
  Rest	
  API	
  Performance	
  Testing	
  with	
  JMeter	
  on	
  EC2	
  Cloud	
  
India	
  Office	
  Address:	
  Waviz	
  Tech.	
  (P)	
  Ltd.	
  	
  D-­77,	
  Bassment-­8,	
  Sector-­63,	
  Noida-­201301	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
Phone:	
  +91-­120-­429-­5252	
  |	
  www.waviz.com|	
  	
  info@waviz.com	
  
	
  
	
  
Resource Utilization of Server
• Memory consumption
• CPU usage
• Network I/O
• Disk I/O etc
Pros:
• It’s the best tool for functional load testing. We can model
complex user flows, using conditions and also create assertions
to validate the behavior.
• It’s relatively easy to simulate non-trivial HTTP requests, such
as requests that require logging in before or file uploads.
• Very extensible. There is a large number of community plugins
to modify and extend the built-in behaviors
• Open source and free
Cons:
• The GUI has a steep learning curve. It’s bloated with options,
and there is a large number of concepts to learn before you can
run your first test.
• When testing with high loads, the workflow becomes
cumbersome. You will need to first use the GUI to generate the
XML test plan.
Challenges :
Request count > 1000, Single JMeter instance will not be sufficient. We need
JMeter cluster with multiple machine, we will use capabilities of JMeter
Distributed Tests which has some limitations also. JMeter uses RMI to
communicate in distributed environment but these connection require all
machines to be on the same subnet and this is not feasible with EC2
Case	
  Study	
  Rest	
  API	
  Performance	
  Testing	
  with	
  JMeter	
  on	
  EC2	
  Cloud	
  
India	
  Office	
  Address:	
  Waviz	
  Tech.	
  (P)	
  Ltd.	
  	
  D-­77,	
  Bassment-­8,	
  Sector-­63,	
  Noida-­201301	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
Phone:	
  +91-­120-­429-­5252	
  |	
  www.waviz.com|	
  	
  info@waviz.com	
  
	
  
	
  
instances. Load Test becomes effective only when the load comes from
different IP Addresses similar to real world scenario and not from a single
source IP.
Implementation : Distributed Testing using JMeter on EC2
AWS	
  
We have followed below implementation.
• Master : Which has controls and pass .jmx scripts. It may be JMeter
GUI or some EC2 node
• Slave : The EC2 instance having running JMeter server, which takes
commands from Master and send request to target.
• Target : The web server we plan to stress test.
• The idea is that we have 1 master instance that sends the test to 4
slaves. These slaves execute the test and send the results back to the
master who will collect and combine the results.
• Test will be executed on all 4 slave machines and not divided across
them.
Case	
  Study	
  Rest	
  API	
  Performance	
  Testing	
  with	
  JMeter	
  on	
  EC2	
  Cloud	
  
India	
  Office	
  Address:	
  Waviz	
  Tech.	
  (P)	
  Ltd.	
  	
  D-­77,	
  Bassment-­8,	
  Sector-­63,	
  Noida-­201301	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
Phone:	
  +91-­120-­429-­5252	
  |	
  www.waviz.com|	
  	
  info@waviz.com	
  
	
  
	
  
EC2 Instances Set-Up:
We are using 5 EC2 instances (medium instances usually do the job) with
Ubuntu server.
Since we are using SSH tunnels to the slaves and we don’t know how long it
is going to take, so it’s a good idea to keep the SSH alive.
We can give those instances static IP addresses, and configure the hosts file
to use domain names. By doing so, we can create a central script to create
the tunnels every time you start the machines.
SSH Port Forward: JMeter will be configured to use the localhost IP (+ port) to
connect to the server. Based on the graph above, we need to create three
tunnels (2 outgoing, 1 incoming) for each slave.
	
  

More Related Content

What's hot

What is Puppet? | How Puppet Works? | Puppet Tutorial For Beginners | DevOps ...
What is Puppet? | How Puppet Works? | Puppet Tutorial For Beginners | DevOps ...What is Puppet? | How Puppet Works? | Puppet Tutorial For Beginners | DevOps ...
What is Puppet? | How Puppet Works? | Puppet Tutorial For Beginners | DevOps ...
Simplilearn
 

What's hot (20)

Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
 
Discovering the Service Fabric's actor model
Discovering the Service Fabric's actor modelDiscovering the Service Fabric's actor model
Discovering the Service Fabric's actor model
 
Angular performance improvments
Angular performance improvmentsAngular performance improvments
Angular performance improvments
 
Infrastructure as code
Infrastructure as codeInfrastructure as code
Infrastructure as code
 
The art of Azure Functions (unit) testing and monitoring
The art of Azure Functions (unit) testing and monitoringThe art of Azure Functions (unit) testing and monitoring
The art of Azure Functions (unit) testing and monitoring
 
Automate NGINX with DevOps Tools
Automate NGINX with DevOps ToolsAutomate NGINX with DevOps Tools
Automate NGINX with DevOps Tools
 
P09
P09P09
P09
 
Postman tests in jenkins
Postman tests in jenkinsPostman tests in jenkins
Postman tests in jenkins
 
How to Cover All Your Backend Testing Needs with API and UI Tests
How to Cover All Your Backend Testing Needs with API and UI TestsHow to Cover All Your Backend Testing Needs with API and UI Tests
How to Cover All Your Backend Testing Needs with API and UI Tests
 
Automating Compliance with InSpec - AWS North Sydney
Automating Compliance with InSpec - AWS North SydneyAutomating Compliance with InSpec - AWS North Sydney
Automating Compliance with InSpec - AWS North Sydney
 
DevOps: Infrastructure as Code
DevOps: Infrastructure as CodeDevOps: Infrastructure as Code
DevOps: Infrastructure as Code
 
CloudBees Continuous Integration and Test with Appvance PerformanceCloud
CloudBees Continuous Integration and Test with Appvance PerformanceCloudCloudBees Continuous Integration and Test with Appvance PerformanceCloud
CloudBees Continuous Integration and Test with Appvance PerformanceCloud
 
Ruby on rails integration testing with minitest and capybara
Ruby on rails integration testing with minitest and capybaraRuby on rails integration testing with minitest and capybara
Ruby on rails integration testing with minitest and capybara
 
Web services Hand_Out
Web services Hand_OutWeb services Hand_Out
Web services Hand_Out
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
 
Java 8 concurrency abstractions
Java 8 concurrency abstractionsJava 8 concurrency abstractions
Java 8 concurrency abstractions
 
What is Puppet? | How Puppet Works? | Puppet Tutorial For Beginners | DevOps ...
What is Puppet? | How Puppet Works? | Puppet Tutorial For Beginners | DevOps ...What is Puppet? | How Puppet Works? | Puppet Tutorial For Beginners | DevOps ...
What is Puppet? | How Puppet Works? | Puppet Tutorial For Beginners | DevOps ...
 
Test Driven Development using QUnit
Test Driven Development using QUnitTest Driven Development using QUnit
Test Driven Development using QUnit
 
Continuous Integration, Deploy, Test From Beginning To End 2014
Continuous Integration, Deploy, Test From Beginning To End 2014Continuous Integration, Deploy, Test From Beginning To End 2014
Continuous Integration, Deploy, Test From Beginning To End 2014
 
Salesforce asynchronous apex
Salesforce asynchronous apexSalesforce asynchronous apex
Salesforce asynchronous apex
 

Viewers also liked

XPath XQuery Training by Wishtree in India Pune Bangalore Bengaluru Gurgaon ...
XPath  XQuery Training by Wishtree in India Pune Bangalore Bengaluru Gurgaon ...XPath  XQuery Training by Wishtree in India Pune Bangalore Bengaluru Gurgaon ...
XPath XQuery Training by Wishtree in India Pune Bangalore Bengaluru Gurgaon ...
Wishtree Technologies
 
Unix command
Unix commandUnix command
Unix command
Atul Pant
 
Computaris Top Testing Suite (Full Demonstration)
Computaris Top Testing Suite (Full Demonstration)Computaris Top Testing Suite (Full Demonstration)
Computaris Top Testing Suite (Full Demonstration)
Computaris
 
LoadRunner Performance Testing
LoadRunner Performance TestingLoadRunner Performance Testing
LoadRunner Performance Testing
Atul Pant
 
How to Analyze Reports in Jmeter
How to Analyze Reports in JmeterHow to Analyze Reports in Jmeter
How to Analyze Reports in Jmeter
Viviana Lesmes
 
Performance Test Plan - Sample 1
Performance Test Plan - Sample 1Performance Test Plan - Sample 1
Performance Test Plan - Sample 1
Atul Pant
 
Jmeter Performance Testing
Jmeter Performance TestingJmeter Performance Testing
Jmeter Performance Testing
Atul Pant
 
Performance testing jmeter
Performance testing jmeterPerformance testing jmeter
Performance testing jmeter
Bhojan Rajan
 

Viewers also liked (18)

XPath XQuery Training by Wishtree in India Pune Bangalore Bengaluru Gurgaon ...
XPath  XQuery Training by Wishtree in India Pune Bangalore Bengaluru Gurgaon ...XPath  XQuery Training by Wishtree in India Pune Bangalore Bengaluru Gurgaon ...
XPath XQuery Training by Wishtree in India Pune Bangalore Bengaluru Gurgaon ...
 
JMeter
JMeterJMeter
JMeter
 
Unix command
Unix commandUnix command
Unix command
 
Computaris Top Testing Suite (Full Demonstration)
Computaris Top Testing Suite (Full Demonstration)Computaris Top Testing Suite (Full Demonstration)
Computaris Top Testing Suite (Full Demonstration)
 
Performance Requirement Gathering
Performance Requirement GatheringPerformance Requirement Gathering
Performance Requirement Gathering
 
Performance Testing in a Mobile World
Performance Testing in a Mobile WorldPerformance Testing in a Mobile World
Performance Testing in a Mobile World
 
Performance Testing With Jmeter
Performance Testing With JmeterPerformance Testing With Jmeter
Performance Testing With Jmeter
 
LoadRunner Performance Testing
LoadRunner Performance TestingLoadRunner Performance Testing
LoadRunner Performance Testing
 
Automation - Apache JMeter
Automation - Apache JMeterAutomation - Apache JMeter
Automation - Apache JMeter
 
How to Analyze Reports in Jmeter
How to Analyze Reports in JmeterHow to Analyze Reports in Jmeter
How to Analyze Reports in Jmeter
 
Performance Testing for Mobile Apps & Sites using Apache JMeter
Performance Testing for Mobile Apps & Sites using Apache JMeterPerformance Testing for Mobile Apps & Sites using Apache JMeter
Performance Testing for Mobile Apps & Sites using Apache JMeter
 
Performance Test Plan - Sample 1
Performance Test Plan - Sample 1Performance Test Plan - Sample 1
Performance Test Plan - Sample 1
 
Performance testing and reporting with JMeter
Performance testing and reporting with JMeterPerformance testing and reporting with JMeter
Performance testing and reporting with JMeter
 
Interpreting Performance Test Results
Interpreting Performance Test ResultsInterpreting Performance Test Results
Interpreting Performance Test Results
 
Performance Testing
Performance TestingPerformance Testing
Performance Testing
 
Jmeter Performance Testing
Jmeter Performance TestingJmeter Performance Testing
Jmeter Performance Testing
 
Performance testing jmeter
Performance testing jmeterPerformance testing jmeter
Performance testing jmeter
 
Performance testing of mobile apps
Performance testing of mobile appsPerformance testing of mobile apps
Performance testing of mobile apps
 

Similar to Rest Api Performance Testing with JMeter and EC2

Productivity Acceleration Tools for SOA Testers
Productivity Acceleration Tools for SOA TestersProductivity Acceleration Tools for SOA Testers
Productivity Acceleration Tools for SOA Testers
WSO2
 
Testing in the Cloud using Panda
Testing in the Cloud using PandaTesting in the Cloud using Panda
Testing in the Cloud using Panda
Tao Jiang
 
Test Strategy For Future Cloud Architecture
Test Strategy For Future Cloud ArchitectureTest Strategy For Future Cloud Architecture
Test Strategy For Future Cloud Architecture
MaheshShri1
 

Similar to Rest Api Performance Testing with JMeter and EC2 (20)

Pure Systems Patterns of Expertise - John Kaemmerer and Gerry Kovan, 11th Sep...
Pure Systems Patterns of Expertise - John Kaemmerer and Gerry Kovan, 11th Sep...Pure Systems Patterns of Expertise - John Kaemmerer and Gerry Kovan, 11th Sep...
Pure Systems Patterns of Expertise - John Kaemmerer and Gerry Kovan, 11th Sep...
 
Integration Testing as Validation and Monitoring
 Integration Testing as Validation and Monitoring Integration Testing as Validation and Monitoring
Integration Testing as Validation and Monitoring
 
КОСТЯНТИН НАТАЛУХА «Setup and run automated test framework for Android applic...
КОСТЯНТИН НАТАЛУХА «Setup and run automated test framework for Android applic...КОСТЯНТИН НАТАЛУХА «Setup and run automated test framework for Android applic...
КОСТЯНТИН НАТАЛУХА «Setup and run automated test framework for Android applic...
 
Productivity Acceleration Tools for SOA Testers
Productivity Acceleration Tools for SOA TestersProductivity Acceleration Tools for SOA Testers
Productivity Acceleration Tools for SOA Testers
 
Testing in the Cloud using Panda
Testing in the Cloud using PandaTesting in the Cloud using Panda
Testing in the Cloud using Panda
 
Getting Started with Platform-as-a-Service
Getting Started with Platform-as-a-ServiceGetting Started with Platform-as-a-Service
Getting Started with Platform-as-a-Service
 
QSpiders - Presentation JMeter
QSpiders - Presentation JMeterQSpiders - Presentation JMeter
QSpiders - Presentation JMeter
 
Basic of jMeter
Basic of jMeter Basic of jMeter
Basic of jMeter
 
Windows azure overview for SharePoint Pros
Windows azure overview for SharePoint Pros Windows azure overview for SharePoint Pros
Windows azure overview for SharePoint Pros
 
Getting Started with PaaS
Getting Started with PaaSGetting Started with PaaS
Getting Started with PaaS
 
Cloud-based performance testing
Cloud-based performance testingCloud-based performance testing
Cloud-based performance testing
 
Test Strategy For Future Cloud Architecture
Test Strategy For Future Cloud ArchitectureTest Strategy For Future Cloud Architecture
Test Strategy For Future Cloud Architecture
 
Azure functions
Azure functionsAzure functions
Azure functions
 
Writing Acceptance Tests Using Fitnesse
Writing Acceptance Tests Using FitnesseWriting Acceptance Tests Using Fitnesse
Writing Acceptance Tests Using Fitnesse
 
AwareIM Custom plug ins
AwareIM Custom plug insAwareIM Custom plug ins
AwareIM Custom plug ins
 
Resume
ResumeResume
Resume
 
Setup and run automated test framework for android application
Setup and run automated test framework for android applicationSetup and run automated test framework for android application
Setup and run automated test framework for android application
 
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
 
Machine learning at scale with aws sage maker
Machine learning at scale with aws sage makerMachine learning at scale with aws sage maker
Machine learning at scale with aws sage maker
 
JMeter & ColdFusion
JMeter & ColdFusion JMeter & ColdFusion
JMeter & ColdFusion
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Recently uploaded (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 

Rest Api Performance Testing with JMeter and EC2

  • 1. Case  Study  Rest  API  Performance  Testing  with  JMeter  on  EC2  Cloud   India  Office  Address:  Waviz  Tech.  (P)  Ltd.    D-­77,  Bassment-­8,  Sector-­63,  Noida-­201301                                                       Phone:  +91-­120-­429-­5252  |  www.waviz.com|    info@waviz.com           Objective: To test the REST API’s performance, which is deployed on EC2 Cloud. To perform ‘Stress Test’ on the server by simulating 5000 concurrent requests. Why we have chosen JMeter: The leader of the pack in awareness is probably Apache JMeter. This is an open-source Java application whose key feature is a powerful and complete GUI which you use to create test plans. A test plan is composed by test components which define every piece of the test such as: • Threads that are used to inject load • Parametrizing HTTP requests used in the test • Adding listeners, which are widget-like test components used to display results in different ways Before selecting a tool, keep in mind different parameters such as the tool should be cost effective, easy to use, easy to configure & easily available third party plug in, if needed. Here we will discuss JMeter as it has all the stated features in it, as well as it has more support from well-established open source community as compared to LoadUI. JMeter can be used to gather information related to API request, response time of server & resource utilization of server for a given number of threads in following ways: Request/Response time of RESTful APIs • TPS (transaction per second) • Aggregate time of all virtual users • Request-response time graph of APIs • Active thread in a given time • View results in tree (actual results will be shown)
  • 2. Case  Study  Rest  API  Performance  Testing  with  JMeter  on  EC2  Cloud   India  Office  Address:  Waviz  Tech.  (P)  Ltd.    D-­77,  Bassment-­8,  Sector-­63,  Noida-­201301                                                       Phone:  +91-­120-­429-­5252  |  www.waviz.com|    info@waviz.com       Resource Utilization of Server • Memory consumption • CPU usage • Network I/O • Disk I/O etc Pros: • It’s the best tool for functional load testing. We can model complex user flows, using conditions and also create assertions to validate the behavior. • It’s relatively easy to simulate non-trivial HTTP requests, such as requests that require logging in before or file uploads. • Very extensible. There is a large number of community plugins to modify and extend the built-in behaviors • Open source and free Cons: • The GUI has a steep learning curve. It’s bloated with options, and there is a large number of concepts to learn before you can run your first test. • When testing with high loads, the workflow becomes cumbersome. You will need to first use the GUI to generate the XML test plan. Challenges : Request count > 1000, Single JMeter instance will not be sufficient. We need JMeter cluster with multiple machine, we will use capabilities of JMeter Distributed Tests which has some limitations also. JMeter uses RMI to communicate in distributed environment but these connection require all machines to be on the same subnet and this is not feasible with EC2
  • 3. Case  Study  Rest  API  Performance  Testing  with  JMeter  on  EC2  Cloud   India  Office  Address:  Waviz  Tech.  (P)  Ltd.    D-­77,  Bassment-­8,  Sector-­63,  Noida-­201301                                                       Phone:  +91-­120-­429-­5252  |  www.waviz.com|    info@waviz.com       instances. Load Test becomes effective only when the load comes from different IP Addresses similar to real world scenario and not from a single source IP. Implementation : Distributed Testing using JMeter on EC2 AWS   We have followed below implementation. • Master : Which has controls and pass .jmx scripts. It may be JMeter GUI or some EC2 node • Slave : The EC2 instance having running JMeter server, which takes commands from Master and send request to target. • Target : The web server we plan to stress test. • The idea is that we have 1 master instance that sends the test to 4 slaves. These slaves execute the test and send the results back to the master who will collect and combine the results. • Test will be executed on all 4 slave machines and not divided across them.
  • 4. Case  Study  Rest  API  Performance  Testing  with  JMeter  on  EC2  Cloud   India  Office  Address:  Waviz  Tech.  (P)  Ltd.    D-­77,  Bassment-­8,  Sector-­63,  Noida-­201301                                                       Phone:  +91-­120-­429-­5252  |  www.waviz.com|    info@waviz.com       EC2 Instances Set-Up: We are using 5 EC2 instances (medium instances usually do the job) with Ubuntu server. Since we are using SSH tunnels to the slaves and we don’t know how long it is going to take, so it’s a good idea to keep the SSH alive. We can give those instances static IP addresses, and configure the hosts file to use domain names. By doing so, we can create a central script to create the tunnels every time you start the machines. SSH Port Forward: JMeter will be configured to use the localhost IP (+ port) to connect to the server. Based on the graph above, we need to create three tunnels (2 outgoing, 1 incoming) for each slave.