SlideShare ist ein Scribd-Unternehmen logo
1 von 12
Performance Testing REST APIs
Selenium Conference 2013
Jason Weden @jweden
Principal Quality Engineer
Constant Contact, WebServices
Copyright © 2012 Constant Contact Inc. 1
Who We Are
 What do we do?
 Expose our internal web services externally to developers and
partners via an API for their own applications.
 http://developer.constantcontact.com
 Fun Digression: Very easy to get up and running with signing into API using
Mashery and using our console to hit the REST API
Copyright © 2012 Constant Contact Inc. 2
Problem Domain
 System Under Test: HTTP REST APIs
 Hitting the REST API with concurrent connections
 Defining your Performance Test approach
 Getting & Sharing results – performance metrics
Copyright © 2012 Constant Contact Inc. 3
Lesson 1: Be DRY
 Why in the heck repeat yourself?
 You already have the logic in your functional tests for REST calls so
reuse that logic for your performance tests
 http://techblog.constantcontact.com/api/what-lego-blocks-teach-us-
about-rest-api-testing/
 Reuse your data-seeding (e.g. for tests that have GET calls)
 Tools like LoadRunner and Jmeter have their place but
 They’re creating blocking connections that reduce scalability
 You are wet – you’re rewriting logic you already wrote in your functional
tests
 You confine the creation, execution, and general knowledge of the
performance testing arena to one or more toolsmiths
Copyright © 2012 Constant Contact Inc. 4
Lesson 2: Choose Carefully
 Choose your http client library with care
 Non-blocking
 Scale-up
 Seriously consider Akka (if on the JVM)
 Non-blocking but with high throughput
 Scales to multiple processors and prevents need to deal with shared state
 More on this later
 Other Examples on the JVM of non-blocking http clients
 http://spray.io (Scala) – Spray – Akka-based
 http://www.eclipse.org/jetty/ (Java) -- Jetty 9
 https://github.com/timboudreau/netty-http-client (Java) -- Netty
Copyright © 2012 Constant Contact Inc. 5
Lesson 2: Choose Carefully (cont.) – Our Choice…
 Written in Java but takes advantage of Akka for concurrency
 Integrated into test framework for everyone to use
 3rd Party libraries
 Apache HttpClient library
 Apache HttpCore library
 Akka concurrency framework
 Apache Commons Math3 library
 High performance
 Easy to use programmatic API – small learning curve
 Developers can go in and create performance tests
 Useful for any http functional OR performance testing
 Even functional tests have performance metrics logged
Copyright © 2012 Constant Contact Inc. 6
Lesson 2: Choose Carefully (cont.) – Our Choice…
 Found errors & significant bottlenecks
 Comparison with JMeter and LoadRunner
 Preliminary tests show faster than JMeter (even with our 8
threads vs JMeter's 1500)
 All performance tests can be checked into source control
 No dependency on toolsmiths for HTTP performance testing
 Performance testing experience shared across the team
 Likely faster than JMeter and LoadRunner -- still to be
scientifically determined
 Ability to tweak our home-grown solution vs. closed source
purchased solutions. (e.g. lots of concurrency properties to
tweak)
Copyright © 2012 Constant Contact Inc. 7
Lesson 3: Devise a Performance Test Plan
 What is your SLA? (e.g. avg. response time, avg. requests/sec)
 What kind of performance test? Options:
 Profile of production performance. Do the following
concurrently:
 X amount of POSTs to endpoint 1
 Y amount of GETs to endpoint 2 (data seeding needed)
 Z amount of DELETEs to endpoint 3 (data seeding needed)
 One type of Request: x amount of GETs
 Longevity – run test above for x amount of time
 What metrics will be recorded (client vs server)?
 How will results be captured and reported?
 Have sign-offs on your test plan (e.g. in a wiki section)
Copyright © 2012 Constant Contact Inc. 8
Lesson 4: Capture Perf. Test Results in a Database
 Capture:
 Performance Metrics
 Client: min/max/avg response time, standard deviation, avg
requests/second, percentiles, request failures
 Server: cpu, memory, open db connections, thread count, consider app.
profiling
 Test tool used and version
 Test name and description
 Freeform comments
 Concurrency level
 In what environment was test performed (server hostnames)
 When it was performed
 Version of Test tool and application under test
 Allows for posterity
 Allows for trending
Copyright © 2012 Constant Contact Inc. 9
Lesson 5: Run Performance Tests Continuously
 Lobby for a dedicated performance environment
 Run tests in non-production CI environments if only for trending relative
measurements
 Run daily
Copyright © 2012 Constant Contact Inc. 10
Lesson 6: Create Visualizations for Perf Test Results
 Charts, Charts, Charts: Have a webpage dashboard
 Preferably having ability to query or filter to obtain customized results
 Charts, Charts, Charts: Email results of each performance test run
 Visualization Research:
 Splunk w/ DB Connect
 D3: http://shop.oreilly.com/product/0636920026938.do
 Fun Digression: playing with this at: http://codepen.io
Copyright © 2012 Constant Contact Inc. 11
References – The end…
 http://akka.io/
 http://commons.apache.org/math/
 http://hc.apache.org/httpcomponents-client-ga/
 Slides available at: https://www.slideshare.net/jweden/rest-
performance-testing
Copyright © 2012 Constant Contact Inc. 12

Weitere ähnliche Inhalte

Was ist angesagt?

Performance Testing from Scratch + JMeter intro
Performance Testing from Scratch + JMeter introPerformance Testing from Scratch + JMeter intro
Performance Testing from Scratch + JMeter introMykola Kovsh
 
Performance testing with jmeter
Performance testing with jmeter Performance testing with jmeter
Performance testing with jmeter Knoldus Inc.
 
Load Testing Best Practices
Load Testing Best PracticesLoad Testing Best Practices
Load Testing Best PracticesApica
 
QA. Load Testing
QA. Load TestingQA. Load Testing
QA. Load TestingAlex Galkin
 
Performance Engineering
Performance EngineeringPerformance Engineering
Performance EngineeringKumar Gupta
 
Performance Testing Using JMeter | Edureka
Performance Testing Using JMeter | EdurekaPerformance Testing Using JMeter | Edureka
Performance Testing Using JMeter | EdurekaEdureka!
 
Performance testing interview questions and answers
Performance testing interview questions and answersPerformance testing interview questions and answers
Performance testing interview questions and answersGaruda Trainings
 
Mobile application testing tutorial
Mobile application testing tutorialMobile application testing tutorial
Mobile application testing tutorialLokesh Agrawal
 
Mobile application testing
Mobile application testingMobile application testing
Mobile application testingSoftheme
 
Performance and load testing
Performance and load testingPerformance and load testing
Performance and load testingsonukalpana
 
Load Test Drupal Site Using JMeter and Amazon AWS
Load Test Drupal Site Using JMeter and Amazon AWSLoad Test Drupal Site Using JMeter and Amazon AWS
Load Test Drupal Site Using JMeter and Amazon AWSVladimir Ilic
 
Performance Test Plan - Sample 1
Performance Test Plan - Sample 1Performance Test Plan - Sample 1
Performance Test Plan - Sample 1Atul Pant
 
Apache JMeter - A brief introduction
Apache JMeter - A brief introductionApache JMeter - A brief introduction
Apache JMeter - A brief introductionsilenceIT Inc.
 
Introduction to performance testing
Introduction to performance testingIntroduction to performance testing
Introduction to performance testingRichard Bishop
 
Perofrmance testing and apache jmeter
Perofrmance testing and apache jmeterPerofrmance testing and apache jmeter
Perofrmance testing and apache jmeterlethibichhoa
 
Performance testing
Performance testingPerformance testing
Performance testingJyoti Babbar
 

Was ist angesagt? (20)

Performance Testing from Scratch + JMeter intro
Performance Testing from Scratch + JMeter introPerformance Testing from Scratch + JMeter intro
Performance Testing from Scratch + JMeter intro
 
Performance testing with jmeter
Performance testing with jmeter Performance testing with jmeter
Performance testing with jmeter
 
Load Testing Best Practices
Load Testing Best PracticesLoad Testing Best Practices
Load Testing Best Practices
 
QA. Load Testing
QA. Load TestingQA. Load Testing
QA. Load Testing
 
Performance Engineering
Performance EngineeringPerformance Engineering
Performance Engineering
 
Performance Testing Using JMeter | Edureka
Performance Testing Using JMeter | EdurekaPerformance Testing Using JMeter | Edureka
Performance Testing Using JMeter | Edureka
 
Performance testing interview questions and answers
Performance testing interview questions and answersPerformance testing interview questions and answers
Performance testing interview questions and answers
 
Apache jMeter
Apache jMeterApache jMeter
Apache jMeter
 
Mobile application testing tutorial
Mobile application testing tutorialMobile application testing tutorial
Mobile application testing tutorial
 
Performance testing
Performance testingPerformance testing
Performance testing
 
Mobile application testing
Mobile application testingMobile application testing
Mobile application testing
 
Performance and load testing
Performance and load testingPerformance and load testing
Performance and load testing
 
Load Test Drupal Site Using JMeter and Amazon AWS
Load Test Drupal Site Using JMeter and Amazon AWSLoad Test Drupal Site Using JMeter and Amazon AWS
Load Test Drupal Site Using JMeter and Amazon AWS
 
Performance Test Plan - Sample 1
Performance Test Plan - Sample 1Performance Test Plan - Sample 1
Performance Test Plan - Sample 1
 
Apache JMeter - A brief introduction
Apache JMeter - A brief introductionApache JMeter - A brief introduction
Apache JMeter - A brief introduction
 
Jmeter
JmeterJmeter
Jmeter
 
Introduction to performance testing
Introduction to performance testingIntroduction to performance testing
Introduction to performance testing
 
Perofrmance testing and apache jmeter
Perofrmance testing and apache jmeterPerofrmance testing and apache jmeter
Perofrmance testing and apache jmeter
 
Api testing
Api testingApi testing
Api testing
 
Performance testing
Performance testingPerformance testing
Performance testing
 

Andere mochten auch

Performance Testing using LoadRunner - Kamran Khan [chromeis.com]
Performance Testing using LoadRunner - Kamran Khan [chromeis.com]Performance Testing using LoadRunner - Kamran Khan [chromeis.com]
Performance Testing using LoadRunner - Kamran Khan [chromeis.com]Kamran Khan
 
API Best Practices Webinar: Metrics - What to Measure
API Best Practices Webinar:  Metrics - What to MeasureAPI Best Practices Webinar:  Metrics - What to Measure
API Best Practices Webinar: Metrics - What to MeasureApigee | Google Cloud
 
KPIs for APIs (and how API Calls are the new Web Hits, and you may be measuri...
KPIs for APIs (and how API Calls are the new Web Hits, and you may be measuri...KPIs for APIs (and how API Calls are the new Web Hits, and you may be measuri...
KPIs for APIs (and how API Calls are the new Web Hits, and you may be measuri...John Musser
 
How to Automate API Testing
How to Automate API TestingHow to Automate API Testing
How to Automate API TestingBruno Pedro
 
Evaluating and Testing Web APIs
Evaluating and Testing Web APIsEvaluating and Testing Web APIs
Evaluating and Testing Web APIsSmartBear
 
Performance testing using hp load runner
Performance testing using hp load runnerPerformance testing using hp load runner
Performance testing using hp load runnerReturn on Intelligence
 
API Best Practices
API Best PracticesAPI Best Practices
API Best PracticesSai Koppala
 
Why API Ops is the Next Wave of DevOps
Why API Ops is the Next Wave of DevOpsWhy API Ops is the Next Wave of DevOps
Why API Ops is the Next Wave of DevOpsJohn Musser
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlowAiste Stikliute
 
Five Ways to Scale your API Without Touching Your Code
Five Ways to Scale your API Without Touching Your CodeFive Ways to Scale your API Without Touching Your Code
Five Ways to Scale your API Without Touching Your Code3scale
 
Web api scalability and performance
Web api scalability and performanceWeb api scalability and performance
Web api scalability and performanceHimanshu Desai
 
Postman tests in jenkins
Postman tests in jenkinsPostman tests in jenkins
Postman tests in jenkinsAlex Galkin
 
Django敏捷开发 刘天斯
Django敏捷开发 刘天斯Django敏捷开发 刘天斯
Django敏捷开发 刘天斯liuts
 
Automated Performance Testing With J Meter And Maven
Automated  Performance  Testing With  J Meter And  MavenAutomated  Performance  Testing With  J Meter And  Maven
Automated Performance Testing With J Meter And MavenPerconaPerformance
 
Scaling APIs: Predict, Prepare for, Overcome the Challenges
Scaling APIs: Predict, Prepare for, Overcome the ChallengesScaling APIs: Predict, Prepare for, Overcome the Challenges
Scaling APIs: Predict, Prepare for, Overcome the ChallengesApigee | Google Cloud
 
Automate WebServices Rest API (testing) using Java
Automate WebServices Rest API (testing) using JavaAutomate WebServices Rest API (testing) using Java
Automate WebServices Rest API (testing) using Javaayman diab
 
Pptv lb日志实时分析平台
Pptv lb日志实时分析平台Pptv lb日志实时分析平台
Pptv lb日志实时分析平台drewz lin
 

Andere mochten auch (20)

Performance Testing using LoadRunner - Kamran Khan [chromeis.com]
Performance Testing using LoadRunner - Kamran Khan [chromeis.com]Performance Testing using LoadRunner - Kamran Khan [chromeis.com]
Performance Testing using LoadRunner - Kamran Khan [chromeis.com]
 
API Best Practices Webinar: Metrics - What to Measure
API Best Practices Webinar:  Metrics - What to MeasureAPI Best Practices Webinar:  Metrics - What to Measure
API Best Practices Webinar: Metrics - What to Measure
 
KPIs for APIs (and how API Calls are the new Web Hits, and you may be measuri...
KPIs for APIs (and how API Calls are the new Web Hits, and you may be measuri...KPIs for APIs (and how API Calls are the new Web Hits, and you may be measuri...
KPIs for APIs (and how API Calls are the new Web Hits, and you may be measuri...
 
How to Automate API Testing
How to Automate API TestingHow to Automate API Testing
How to Automate API Testing
 
Evaluating and Testing Web APIs
Evaluating and Testing Web APIsEvaluating and Testing Web APIs
Evaluating and Testing Web APIs
 
Api testing
Api testingApi testing
Api testing
 
Performance testing using hp load runner
Performance testing using hp load runnerPerformance testing using hp load runner
Performance testing using hp load runner
 
API Best Practices
API Best PracticesAPI Best Practices
API Best Practices
 
Why API Ops is the Next Wave of DevOps
Why API Ops is the Next Wave of DevOpsWhy API Ops is the Next Wave of DevOps
Why API Ops is the Next Wave of DevOps
 
REST API testing with SpecFlow
REST API testing with SpecFlowREST API testing with SpecFlow
REST API testing with SpecFlow
 
Building Web APIs that Scale
Building Web APIs that ScaleBuilding Web APIs that Scale
Building Web APIs that Scale
 
Five Ways to Scale your API Without Touching Your Code
Five Ways to Scale your API Without Touching Your CodeFive Ways to Scale your API Without Touching Your Code
Five Ways to Scale your API Without Touching Your Code
 
The Groovy Way
The Groovy WayThe Groovy Way
The Groovy Way
 
Web api scalability and performance
Web api scalability and performanceWeb api scalability and performance
Web api scalability and performance
 
Postman tests in jenkins
Postman tests in jenkinsPostman tests in jenkins
Postman tests in jenkins
 
Django敏捷开发 刘天斯
Django敏捷开发 刘天斯Django敏捷开发 刘天斯
Django敏捷开发 刘天斯
 
Automated Performance Testing With J Meter And Maven
Automated  Performance  Testing With  J Meter And  MavenAutomated  Performance  Testing With  J Meter And  Maven
Automated Performance Testing With J Meter And Maven
 
Scaling APIs: Predict, Prepare for, Overcome the Challenges
Scaling APIs: Predict, Prepare for, Overcome the ChallengesScaling APIs: Predict, Prepare for, Overcome the Challenges
Scaling APIs: Predict, Prepare for, Overcome the Challenges
 
Automate WebServices Rest API (testing) using Java
Automate WebServices Rest API (testing) using JavaAutomate WebServices Rest API (testing) using Java
Automate WebServices Rest API (testing) using Java
 
Pptv lb日志实时分析平台
Pptv lb日志实时分析平台Pptv lb日志实时分析平台
Pptv lb日志实时分析平台
 

Ähnlich wie Performance Testing REST APIs with Non-Blocking Clients

Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02Nitish Bhardwaj
 
Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choicetoddbr
 
Shuvam dutta | Performance tester
Shuvam dutta | Performance testerShuvam dutta | Performance tester
Shuvam dutta | Performance testerShuvam Dutta
 
API automation with JMeter + Bamboo CI
API automation with JMeter + Bamboo CIAPI automation with JMeter + Bamboo CI
API automation with JMeter + Bamboo CIMykola Kovsh
 
Mykola Kovsh - Functional API automation with Jmeter
Mykola Kovsh - Functional API automation with JmeterMykola Kovsh - Functional API automation with Jmeter
Mykola Kovsh - Functional API automation with JmeterIevgenii Katsan
 
Performance testing and j meter
Performance testing and j meterPerformance testing and j meter
Performance testing and j meterPurna Chandar
 
Building Maintainable Android Apps (DroidCon NYC 2014)
Building Maintainable Android Apps (DroidCon NYC 2014)Building Maintainable Android Apps (DroidCon NYC 2014)
Building Maintainable Android Apps (DroidCon NYC 2014)Kevin Schultz
 
Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02Shivakumara .
 
Stepin evening presented
Stepin evening presentedStepin evening presented
Stepin evening presentedVijayan Reddy
 
Automation testing
Automation testingAutomation testing
Automation testingTomy Rhymond
 
JMeter & ColdFusion
JMeter & ColdFusion JMeter & ColdFusion
JMeter & ColdFusion isummation
 
Web and load testing with Visual Studio 2010 Ultimate
Web and load testing with Visual Studio 2010 UltimateWeb and load testing with Visual Studio 2010 Ultimate
Web and load testing with Visual Studio 2010 UltimateAbhimanyu Singhal
 
Introduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang Phi
Introduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang PhiIntroduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang Phi
Introduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang PhiHo Chi Minh City Software Testing Club
 
Getting Started with Apache Jmeter
Getting Started with Apache JmeterGetting Started with Apache Jmeter
Getting Started with Apache JmeterMindfire Solutions
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introductionvstorm83
 
Neha Arora_Resume
Neha Arora_ResumeNeha Arora_Resume
Neha Arora_ResumeNeha Arora
 

Ähnlich wie Performance Testing REST APIs with Non-Blocking Clients (20)

Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02
 
Automated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choiceAutomated Acceptance Tests & Tool choice
Automated Acceptance Tests & Tool choice
 
QSpiders - Presentation JMeter
QSpiders - Presentation JMeterQSpiders - Presentation JMeter
QSpiders - Presentation JMeter
 
Shuvam dutta
Shuvam duttaShuvam dutta
Shuvam dutta
 
Shuvam dutta | Performance tester
Shuvam dutta | Performance testerShuvam dutta | Performance tester
Shuvam dutta | Performance tester
 
API automation with JMeter + Bamboo CI
API automation with JMeter + Bamboo CIAPI automation with JMeter + Bamboo CI
API automation with JMeter + Bamboo CI
 
Mykola Kovsh - Functional API automation with Jmeter
Mykola Kovsh - Functional API automation with JmeterMykola Kovsh - Functional API automation with Jmeter
Mykola Kovsh - Functional API automation with Jmeter
 
Jmeter From Scratch
Jmeter From ScratchJmeter From Scratch
Jmeter From Scratch
 
Performance testing and j meter
Performance testing and j meterPerformance testing and j meter
Performance testing and j meter
 
Building Maintainable Android Apps (DroidCon NYC 2014)
Building Maintainable Android Apps (DroidCon NYC 2014)Building Maintainable Android Apps (DroidCon NYC 2014)
Building Maintainable Android Apps (DroidCon NYC 2014)
 
Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02
 
Stepin evening presented
Stepin evening presentedStepin evening presented
Stepin evening presented
 
Automation testing
Automation testingAutomation testing
Automation testing
 
JMeter & ColdFusion
JMeter & ColdFusion JMeter & ColdFusion
JMeter & ColdFusion
 
Web and load testing with Visual Studio 2010 Ultimate
Web and load testing with Visual Studio 2010 UltimateWeb and load testing with Visual Studio 2010 Ultimate
Web and load testing with Visual Studio 2010 Ultimate
 
Introduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang Phi
Introduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang PhiIntroduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang Phi
Introduction to Back End Automation Testing - Nguyen Vu Hoang, Hoang Phi
 
Selva_Selenium
Selva_SeleniumSelva_Selenium
Selva_Selenium
 
Getting Started with Apache Jmeter
Getting Started with Apache JmeterGetting Started with Apache Jmeter
Getting Started with Apache Jmeter
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
Neha Arora_Resume
Neha Arora_ResumeNeha Arora_Resume
Neha Arora_Resume
 

Kürzlich hochgeladen

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 WorkerThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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 DevelopmentsTrustArc
 
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 RobisonAnna Loughnan Colquhoun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
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 interpreternaman860154
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
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 MenDelhi Call girls
 
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 Servicegiselly40
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
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 MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Kürzlich hochgeladen (20)

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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
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
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

Performance Testing REST APIs with Non-Blocking Clients

  • 1. Performance Testing REST APIs Selenium Conference 2013 Jason Weden @jweden Principal Quality Engineer Constant Contact, WebServices Copyright © 2012 Constant Contact Inc. 1
  • 2. Who We Are  What do we do?  Expose our internal web services externally to developers and partners via an API for their own applications.  http://developer.constantcontact.com  Fun Digression: Very easy to get up and running with signing into API using Mashery and using our console to hit the REST API Copyright © 2012 Constant Contact Inc. 2
  • 3. Problem Domain  System Under Test: HTTP REST APIs  Hitting the REST API with concurrent connections  Defining your Performance Test approach  Getting & Sharing results – performance metrics Copyright © 2012 Constant Contact Inc. 3
  • 4. Lesson 1: Be DRY  Why in the heck repeat yourself?  You already have the logic in your functional tests for REST calls so reuse that logic for your performance tests  http://techblog.constantcontact.com/api/what-lego-blocks-teach-us- about-rest-api-testing/  Reuse your data-seeding (e.g. for tests that have GET calls)  Tools like LoadRunner and Jmeter have their place but  They’re creating blocking connections that reduce scalability  You are wet – you’re rewriting logic you already wrote in your functional tests  You confine the creation, execution, and general knowledge of the performance testing arena to one or more toolsmiths Copyright © 2012 Constant Contact Inc. 4
  • 5. Lesson 2: Choose Carefully  Choose your http client library with care  Non-blocking  Scale-up  Seriously consider Akka (if on the JVM)  Non-blocking but with high throughput  Scales to multiple processors and prevents need to deal with shared state  More on this later  Other Examples on the JVM of non-blocking http clients  http://spray.io (Scala) – Spray – Akka-based  http://www.eclipse.org/jetty/ (Java) -- Jetty 9  https://github.com/timboudreau/netty-http-client (Java) -- Netty Copyright © 2012 Constant Contact Inc. 5
  • 6. Lesson 2: Choose Carefully (cont.) – Our Choice…  Written in Java but takes advantage of Akka for concurrency  Integrated into test framework for everyone to use  3rd Party libraries  Apache HttpClient library  Apache HttpCore library  Akka concurrency framework  Apache Commons Math3 library  High performance  Easy to use programmatic API – small learning curve  Developers can go in and create performance tests  Useful for any http functional OR performance testing  Even functional tests have performance metrics logged Copyright © 2012 Constant Contact Inc. 6
  • 7. Lesson 2: Choose Carefully (cont.) – Our Choice…  Found errors & significant bottlenecks  Comparison with JMeter and LoadRunner  Preliminary tests show faster than JMeter (even with our 8 threads vs JMeter's 1500)  All performance tests can be checked into source control  No dependency on toolsmiths for HTTP performance testing  Performance testing experience shared across the team  Likely faster than JMeter and LoadRunner -- still to be scientifically determined  Ability to tweak our home-grown solution vs. closed source purchased solutions. (e.g. lots of concurrency properties to tweak) Copyright © 2012 Constant Contact Inc. 7
  • 8. Lesson 3: Devise a Performance Test Plan  What is your SLA? (e.g. avg. response time, avg. requests/sec)  What kind of performance test? Options:  Profile of production performance. Do the following concurrently:  X amount of POSTs to endpoint 1  Y amount of GETs to endpoint 2 (data seeding needed)  Z amount of DELETEs to endpoint 3 (data seeding needed)  One type of Request: x amount of GETs  Longevity – run test above for x amount of time  What metrics will be recorded (client vs server)?  How will results be captured and reported?  Have sign-offs on your test plan (e.g. in a wiki section) Copyright © 2012 Constant Contact Inc. 8
  • 9. Lesson 4: Capture Perf. Test Results in a Database  Capture:  Performance Metrics  Client: min/max/avg response time, standard deviation, avg requests/second, percentiles, request failures  Server: cpu, memory, open db connections, thread count, consider app. profiling  Test tool used and version  Test name and description  Freeform comments  Concurrency level  In what environment was test performed (server hostnames)  When it was performed  Version of Test tool and application under test  Allows for posterity  Allows for trending Copyright © 2012 Constant Contact Inc. 9
  • 10. Lesson 5: Run Performance Tests Continuously  Lobby for a dedicated performance environment  Run tests in non-production CI environments if only for trending relative measurements  Run daily Copyright © 2012 Constant Contact Inc. 10
  • 11. Lesson 6: Create Visualizations for Perf Test Results  Charts, Charts, Charts: Have a webpage dashboard  Preferably having ability to query or filter to obtain customized results  Charts, Charts, Charts: Email results of each performance test run  Visualization Research:  Splunk w/ DB Connect  D3: http://shop.oreilly.com/product/0636920026938.do  Fun Digression: playing with this at: http://codepen.io Copyright © 2012 Constant Contact Inc. 11
  • 12. References – The end…  http://akka.io/  http://commons.apache.org/math/  http://hc.apache.org/httpcomponents-client-ga/  Slides available at: https://www.slideshare.net/jweden/rest- performance-testing Copyright © 2012 Constant Contact Inc. 12