SlideShare uma empresa Scribd logo
1 de 27
Load Testing for Startups with
artillery.io
Hassy Veldstra <h@veldstra.org>
@hveldstra
Story
• Simulating a lot of users to see how your
application behaves
Load testing
• Simulating a lot of users to see how your
application behaves
• Examples:
• Blog: a story on the front page of Reddit
• Dice.fm: Beyoncé’s gig announced
• Deliveroo: 6-9pm every day
• ASOS: Black Friday
Load testing
Goals
• Analyze performance
• How fast is it / Is it fast enough?
• Soak testing – finding memory leaks and other resource leaks
Goals
• Analyze performance
• How fast is it / Is it fast enough?
• Soak testing – finding memory leaks and other resource leaks
• Analyze reliability
• Does it degrade gracefully under stress?
• Monitoring and alerting working as intended?
Goals
• Analyze performance
• How fast is it / Is it fast enough?
• Soak testing – finding memory leaks and other resource leaks
• Analyze reliability
• Does it degrade gracefully under stress?
• Monitoring and alerting working as intended?
• Capacity testing
• Can we handle the projected load with acceptable performance with the
architecture / hardware we have?
Goals
• Analyze performance
• How fast is it / Is it fast enough?
• Soak testing – finding memory leaks and other resource leaks
• Analyze reliability
• Does it degrade gracefully under stress?
• Monitoring and alerting working as intended?
• Capacity testing
• Can we handle the projected load with acceptable performance with the
architecture / hardware we have?
• Analyze scalability
• How does the system scale if we add more servers / upgrade the
hardware? Is it linear? Where are the bottlenecks?
1. Best case latency
2. 99th percentile latency under load
3. Throughput under load
Performance Metrics
Backend Performance
Backend Performance
1. Network performance
• How long it takes for HTML/CSS/JS to download
Backend Performance
1. Network performance
• How long it takes for HTML/CSS/JS to download
2. Front-end performance
• How long it takes for it to render and display
• How it’s rendered and displayed (UI)
Backend Performance
1. Network performance
• How long it takes for HTML/CSS/JS to download
2. Front-end performance
• How long it takes for it to render and display
• How it’s rendered and displayed (UI)
3. Backend performance
• How long it takes for the server to process a
request
• npm install –g artillery
• artilery run my_test_script.json
How Artillery Works
• npm install –g artillery
• artilery run my_test_script.json
• A test script is:
1. One or more scenarios
2. One or more load phases
How Artillery Works
• ASOS:
• Load the homepage
• Run a search with some keyword
• Repeat three times:
• Pick a result at random and load the details for that product
• Add the product to basket
• Go to checkout
Scenarios
1. Create 10 virtual users every second for 3 minutes
(warm up)
2. Ramp up to 50 virtual users a second over another 3
minutes
3. Run at 50 virtual users a second for 25 minutes
Load Phases
2 hour plan
2 hour plan
1. Get an APM tool (e.g. New Relic)
2 hour plan
1. Get an APM tool (e.g. New Relic)
2. Install an error/crash-reporting (e.g. GetSentry)
2 hour plan
1. Get an APM tool (e.g. New Relic)
2. Install an error/crash-reporting (e.g. GetSentry)
3. Write a simple Artillery script (just one happy-path
from the app)
2 hour plan
1. Get an APM tool (e.g. New Relic)
2. Install an error/crash-reporting (e.g. GetSentry)
3. Write a simple Artillery script (just one happy-path
from the app)
4. Run that against dev/testing environment at a low
load
2 hour plan
1. Get an APM tool (e.g. New Relic)
2. Install an error/crash-reporting (e.g. GetSentry)
3. Write a simple Artillery script (just one happy-path
from the app)
4. Run that against dev/testing environment at a low
load
5. Success!
2 hour plan
1. Get an APM tool (e.g. New Relic)
2. Install an error/crash-reporting (e.g. GetSentry)
3. Write a simple Artillery script (just one happy-path
from the app)
4. Run that against dev/testing environment at a low
load
5. Success!
6. Ramp up gradually until the traffic is at the level you
need it to be
2 hour plan
1. Any problems? Great. Now you know and can fix
them.
2. No problems? Great. Now you know.
2 hour plan
1. Bonus: add a job to your CI to run the test every day
Q&A

Mais conteúdo relacionado

Mais procurados

Performance and load testing
Performance and load testingPerformance and load testing
Performance and load testing
sonukalpana
 
Loadrunner presentation
Loadrunner presentationLoadrunner presentation
Loadrunner presentation
medsherb
 

Mais procurados (20)

JMeter vs LoadRunner | Edureka
JMeter vs LoadRunner | EdurekaJMeter vs LoadRunner | Edureka
JMeter vs LoadRunner | Edureka
 
Application Performance Monitoring
Application Performance MonitoringApplication Performance Monitoring
Application Performance Monitoring
 
What is Sauce Labs?
What is Sauce Labs? What is Sauce Labs?
What is Sauce Labs?
 
Loadrunner vs Jmeter
Loadrunner vs JmeterLoadrunner vs Jmeter
Loadrunner vs Jmeter
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Monitoring and alerting as code with Terraform and New Relic
Monitoring and alerting as code with Terraform and New RelicMonitoring and alerting as code with Terraform and New Relic
Monitoring and alerting as code with Terraform and New Relic
 
Test at Scale within your Internal Networks with BrowserStack Local Testing
Test at Scale within your Internal Networks with BrowserStack Local TestingTest at Scale within your Internal Networks with BrowserStack Local Testing
Test at Scale within your Internal Networks with BrowserStack Local Testing
 
Performance and load testing
Performance and load testingPerformance and load testing
Performance and load testing
 
Progressive Web App
Progressive Web AppProgressive Web App
Progressive Web App
 
Hp Loadrunner
Hp LoadrunnerHp Loadrunner
Hp Loadrunner
 
Loadrunner presentation
Loadrunner presentationLoadrunner presentation
Loadrunner presentation
 
Android & iOS Automation Using Appium
Android & iOS Automation Using AppiumAndroid & iOS Automation Using Appium
Android & iOS Automation Using Appium
 
Running distributed tests with k6.pdf
Running distributed tests with k6.pdfRunning distributed tests with k6.pdf
Running distributed tests with k6.pdf
 
Progressive Web-App (PWA)
Progressive Web-App (PWA)Progressive Web-App (PWA)
Progressive Web-App (PWA)
 
Progressive Web Apps
Progressive Web AppsProgressive Web Apps
Progressive Web Apps
 
Postman & API Testing by Amber Race
Postman & API Testing by Amber RacePostman & API Testing by Amber Race
Postman & API Testing by Amber Race
 
Basic of jMeter
Basic of jMeter Basic of jMeter
Basic of jMeter
 
Why Progressive Web App is what you need for your Business
Why Progressive Web App is what you need for your BusinessWhy Progressive Web App is what you need for your Business
Why Progressive Web App is what you need for your Business
 
Testing Your APIs: Postman, Newman, and Beyond
Testing Your APIs: Postman, Newman, and BeyondTesting Your APIs: Postman, Newman, and Beyond
Testing Your APIs: Postman, Newman, and Beyond
 
Progressive Web Apps(PWA)
Progressive Web Apps(PWA)Progressive Web Apps(PWA)
Progressive Web Apps(PWA)
 

Semelhante a Load-testing 101 for Startups with Artillery.io

Creating Havoc using Human Interface Device
Creating Havoc using Human Interface DeviceCreating Havoc using Human Interface Device
Creating Havoc using Human Interface Device
Positive Hack Days
 
Matt Eakin - The New Tester Skillset
Matt Eakin - The New Tester SkillsetMatt Eakin - The New Tester Skillset
Matt Eakin - The New Tester Skillset
QA or the Highway
 

Semelhante a Load-testing 101 for Startups with Artillery.io (20)

Testing - How Vital and How Easy to use
Testing - How Vital and How Easy to useTesting - How Vital and How Easy to use
Testing - How Vital and How Easy to use
 
Concourse Workshop
Concourse WorkshopConcourse Workshop
Concourse Workshop
 
DevSecCon Tel Aviv 2018 - Integrated Security Testing by Morgan Roman
DevSecCon Tel Aviv 2018 - Integrated Security Testing by Morgan RomanDevSecCon Tel Aviv 2018 - Integrated Security Testing by Morgan Roman
DevSecCon Tel Aviv 2018 - Integrated Security Testing by Morgan Roman
 
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
 
Fastest Servlets in the West
Fastest Servlets in the WestFastest Servlets in the West
Fastest Servlets in the West
 
Performance testing material
Performance testing materialPerformance testing material
Performance testing material
 
PAC 2019 virtual Christoph NEUMÜLLER
PAC 2019 virtual Christoph NEUMÜLLERPAC 2019 virtual Christoph NEUMÜLLER
PAC 2019 virtual Christoph NEUMÜLLER
 
Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...
Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...
Performance Metrics for your Build Pipeline - presented at Vienna WebPerf Oct...
 
Build Quality In: Stop the Line - Peter Antman
Build Quality In: Stop the Line - Peter AntmanBuild Quality In: Stop the Line - Peter Antman
Build Quality In: Stop the Line - Peter Antman
 
Heavenly hell – automated tests at scale wojciech seliga
Heavenly hell – automated tests at scale   wojciech seligaHeavenly hell – automated tests at scale   wojciech seliga
Heavenly hell – automated tests at scale wojciech seliga
 
Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...
 
Testing sync engine
Testing sync engineTesting sync engine
Testing sync engine
 
Creating Havoc using Human Interface Device
Creating Havoc using Human Interface DeviceCreating Havoc using Human Interface Device
Creating Havoc using Human Interface Device
 
Intro To Puppet.Key
Intro To Puppet.KeyIntro To Puppet.Key
Intro To Puppet.Key
 
Matt Eakin - The New Tester Skillset
Matt Eakin - The New Tester SkillsetMatt Eakin - The New Tester Skillset
Matt Eakin - The New Tester Skillset
 
Основы нагрузочного тестирования с инструментом Jmeter
Основы нагрузочного тестирования с инструментом JmeterОсновы нагрузочного тестирования с инструментом Jmeter
Основы нагрузочного тестирования с инструментом Jmeter
 
(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014
(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014
(APP309) Running and Monitoring Docker Containers at Scale | AWS re:Invent 2014
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
 
Running & Monitoring Docker at Scale
Running & Monitoring Docker at ScaleRunning & Monitoring Docker at Scale
Running & Monitoring Docker at Scale
 
Eric Proegler Oredev Performance Testing in New Contexts
Eric Proegler Oredev Performance Testing in New ContextsEric Proegler Oredev Performance Testing in New Contexts
Eric Proegler Oredev Performance Testing in New Contexts
 

Último

Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Último (20)

%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 

Load-testing 101 for Startups with Artillery.io

  • 1. Load Testing for Startups with artillery.io Hassy Veldstra <h@veldstra.org> @hveldstra
  • 3. • Simulating a lot of users to see how your application behaves Load testing
  • 4. • Simulating a lot of users to see how your application behaves • Examples: • Blog: a story on the front page of Reddit • Dice.fm: Beyoncé’s gig announced • Deliveroo: 6-9pm every day • ASOS: Black Friday Load testing
  • 5. Goals • Analyze performance • How fast is it / Is it fast enough? • Soak testing – finding memory leaks and other resource leaks
  • 6. Goals • Analyze performance • How fast is it / Is it fast enough? • Soak testing – finding memory leaks and other resource leaks • Analyze reliability • Does it degrade gracefully under stress? • Monitoring and alerting working as intended?
  • 7. Goals • Analyze performance • How fast is it / Is it fast enough? • Soak testing – finding memory leaks and other resource leaks • Analyze reliability • Does it degrade gracefully under stress? • Monitoring and alerting working as intended? • Capacity testing • Can we handle the projected load with acceptable performance with the architecture / hardware we have?
  • 8. Goals • Analyze performance • How fast is it / Is it fast enough? • Soak testing – finding memory leaks and other resource leaks • Analyze reliability • Does it degrade gracefully under stress? • Monitoring and alerting working as intended? • Capacity testing • Can we handle the projected load with acceptable performance with the architecture / hardware we have? • Analyze scalability • How does the system scale if we add more servers / upgrade the hardware? Is it linear? Where are the bottlenecks?
  • 9. 1. Best case latency 2. 99th percentile latency under load 3. Throughput under load Performance Metrics
  • 11. Backend Performance 1. Network performance • How long it takes for HTML/CSS/JS to download
  • 12. Backend Performance 1. Network performance • How long it takes for HTML/CSS/JS to download 2. Front-end performance • How long it takes for it to render and display • How it’s rendered and displayed (UI)
  • 13. Backend Performance 1. Network performance • How long it takes for HTML/CSS/JS to download 2. Front-end performance • How long it takes for it to render and display • How it’s rendered and displayed (UI) 3. Backend performance • How long it takes for the server to process a request
  • 14. • npm install –g artillery • artilery run my_test_script.json How Artillery Works
  • 15. • npm install –g artillery • artilery run my_test_script.json • A test script is: 1. One or more scenarios 2. One or more load phases How Artillery Works
  • 16. • ASOS: • Load the homepage • Run a search with some keyword • Repeat three times: • Pick a result at random and load the details for that product • Add the product to basket • Go to checkout Scenarios
  • 17. 1. Create 10 virtual users every second for 3 minutes (warm up) 2. Ramp up to 50 virtual users a second over another 3 minutes 3. Run at 50 virtual users a second for 25 minutes Load Phases
  • 19. 2 hour plan 1. Get an APM tool (e.g. New Relic)
  • 20. 2 hour plan 1. Get an APM tool (e.g. New Relic) 2. Install an error/crash-reporting (e.g. GetSentry)
  • 21. 2 hour plan 1. Get an APM tool (e.g. New Relic) 2. Install an error/crash-reporting (e.g. GetSentry) 3. Write a simple Artillery script (just one happy-path from the app)
  • 22. 2 hour plan 1. Get an APM tool (e.g. New Relic) 2. Install an error/crash-reporting (e.g. GetSentry) 3. Write a simple Artillery script (just one happy-path from the app) 4. Run that against dev/testing environment at a low load
  • 23. 2 hour plan 1. Get an APM tool (e.g. New Relic) 2. Install an error/crash-reporting (e.g. GetSentry) 3. Write a simple Artillery script (just one happy-path from the app) 4. Run that against dev/testing environment at a low load 5. Success!
  • 24. 2 hour plan 1. Get an APM tool (e.g. New Relic) 2. Install an error/crash-reporting (e.g. GetSentry) 3. Write a simple Artillery script (just one happy-path from the app) 4. Run that against dev/testing environment at a low load 5. Success! 6. Ramp up gradually until the traffic is at the level you need it to be
  • 25. 2 hour plan 1. Any problems? Great. Now you know and can fix them. 2. No problems? Great. Now you know.
  • 26. 2 hour plan 1. Bonus: add a job to your CI to run the test every day
  • 27. Q&A