SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Performance testing interview questions and answers
Performance testing interview questions and answersPerformance testing interview questions and answers
Performance testing interview questions and answersGaruda Trainings
 
Manual testing interview questions by infotech
Manual testing interview questions by infotech Manual testing interview questions by infotech
Manual testing interview questions by infotech suhasreddy1
 
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
 
Introduction to performance testing
Introduction to performance testingIntroduction to performance testing
Introduction to performance testingRichard Bishop
 
Getting Started With Cypress
Getting Started With CypressGetting Started With Cypress
Getting Started With CypressKnoldus Inc.
 
Performance Testing
Performance TestingPerformance Testing
Performance Testingsharmaparish
 
Performance Testing
Performance TestingPerformance Testing
Performance TestingSelin Gungor
 
Introduction to performance testing
Introduction to performance testingIntroduction to performance testing
Introduction to performance testingTharinda Liyanage
 
Types of Software Testing | Edureka
Types of Software Testing | EdurekaTypes of Software Testing | Edureka
Types of Software Testing | EdurekaEdureka!
 
LoadRunner Performance Testing
LoadRunner Performance TestingLoadRunner Performance Testing
LoadRunner Performance TestingAtul Pant
 
Mobile application testing
Mobile application testingMobile application testing
Mobile application testingSoftheme
 
Performance Test Plan - Sample 1
Performance Test Plan - Sample 1Performance Test Plan - Sample 1
Performance Test Plan - Sample 1Atul Pant
 
Introduction to K6
Introduction to K6Introduction to K6
Introduction to K6Knoldus Inc.
 
Infographic: Importance of Performance Testing
Infographic: Importance of Performance TestingInfographic: Importance of Performance Testing
Infographic: Importance of Performance TestingKiwiQA
 
CMS Testing Strategy & CQ5 CMS
CMS Testing Strategy & CQ5 CMSCMS Testing Strategy & CQ5 CMS
CMS Testing Strategy & CQ5 CMSRachana Khedekar
 

Tendances (20)

Performance testing interview questions and answers
Performance testing interview questions and answersPerformance testing interview questions and answers
Performance testing interview questions and answers
 
Neoload
Neoload Neoload
Neoload
 
Manual testing interview questions by infotech
Manual testing interview questions by infotech Manual testing interview questions by infotech
Manual testing interview questions by infotech
 
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
 
Introduction to performance testing
Introduction to performance testingIntroduction to performance testing
Introduction to performance testing
 
Cypress Automation
Cypress  AutomationCypress  Automation
Cypress Automation
 
Fundamentals Performance Testing
Fundamentals Performance TestingFundamentals Performance Testing
Fundamentals Performance Testing
 
Getting Started With Cypress
Getting Started With CypressGetting Started With Cypress
Getting Started With Cypress
 
API Testing for everyone.pptx
API Testing for everyone.pptxAPI Testing for everyone.pptx
API Testing for everyone.pptx
 
Performance Testing
Performance TestingPerformance Testing
Performance Testing
 
Performance Testing
Performance TestingPerformance Testing
Performance Testing
 
Introduction to performance testing
Introduction to performance testingIntroduction to performance testing
Introduction to performance testing
 
Types of Software Testing | Edureka
Types of Software Testing | EdurekaTypes of Software Testing | Edureka
Types of Software Testing | Edureka
 
LoadRunner Performance Testing
LoadRunner Performance TestingLoadRunner Performance Testing
LoadRunner Performance Testing
 
Mobile application testing
Mobile application testingMobile application testing
Mobile application testing
 
Performance Test Plan - Sample 1
Performance Test Plan - Sample 1Performance Test Plan - Sample 1
Performance Test Plan - Sample 1
 
API Testing
API TestingAPI Testing
API Testing
 
Introduction to K6
Introduction to K6Introduction to K6
Introduction to K6
 
Infographic: Importance of Performance Testing
Infographic: Importance of Performance TestingInfographic: Importance of Performance Testing
Infographic: Importance of Performance Testing
 
CMS Testing Strategy & CQ5 CMS
CMS Testing Strategy & CQ5 CMSCMS Testing Strategy & CQ5 CMS
CMS Testing Strategy & CQ5 CMS
 

En vedette

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
 

En vedette (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...
 
Api testing
Api testingApi testing
Api testing
 
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敏捷开发 刘天斯
 
Performance Engineering Basics
Performance Engineering BasicsPerformance Engineering Basics
Performance Engineering Basics
 
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
 

Similaire à 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
 

Similaire à 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
 

Dernier

SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 

Dernier (20)

SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 

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