SlideShare a Scribd company logo
1 of 39
Istanbul
November 22, 2019
TEST AUTOMATION &
DIGITAL QA EVENT
#TAS19
Test the performance of the system when something changes
AUTOMATED
PERFORMANCE
TESTING
MESUT GÜNEŞ
Senior Test Automation Engineer at VNGRS
in/gunesmes
gunesmes
story/gunesmes
gunesmes
testrisk.com
gunesmes@gmail.com
Mesut Güneş - www.testrisk.com
■ Performance testing
■ Type of performance testing (load, stress, soak, volume, capacity,
spike)
■ Automation, Tools, Technologies,
■ Benefits of Automated Tests
■ Integration
■ Thresholds, Percentile, rps
■ CI/CD
■ API
■ Orchestration
■ . . . and more
TALK INCLUDE THESE TOPICS
Mesut Güneş - www.testrisk.com
TABLE OF
CONTENTS
WHAT IS PERFORMANCE
TESTING
Concept of
performance
AUTOMATED
PERFORMANCE TESTING
Concept of automation in
terms of performance
01
03
02 04
05
06
METRICS
What to know about the
metrics during the
performance testing
TOOLS AND
TECHNOLOGIES
What kind of tools we have for
this purpose
THE WAYS OF
IMPLEMENTATION
How we can implement the
automated performance tests
BENEFITS
What kind of benefits
we can have
WHAT IS PERFORMANCE
TESTING
01
Mesut Güneş - www.testrisk.com
Defining the performance of the system by testing the functionalities of the system
in terms of the non-functionalities
Performance Testing is
■ A non-functional testing
■ Testing the functionalities of the system
■ Both black-box and white-box testing
■ Defining how the system works under any loads
■ Applied under different load levels
■ Applied under different load increments
■ Applied under different durations
PERFORMANCE TESTING BY DEFINITION
Mesut Güneş - www.testrisk.com
Performance testing should be also executed in a process. Performance engineers
should ensure that they collected requirements, created correct amount of virtual
users, created test scenarios and they can execute them. As a final they should check
the result and the system, if required after fixing, re-execution may be needed.
PERFORMANCE TESTING BY PROCESS
Planning
Creating test Scripts
Creating the Test Env.
Executing the Tests
Monitoring the Systems
Analyzing & Optimizing
Mesut Güneş - www.testrisk.com
Types of performance testing depend on the strategy that applied during the test by
means of the loads, the duration and increment of the load
Types of Performance Testing is
■ Load
■ Stress
■ Soak
■ Spike
■ Volume
■ Capacity
TYPES OF PERFORMANCE TESTING
Mesut Güneş - www.testrisk.com
Load test is to understand the behavior of the system under a specific load. It is performing
under specific amount of the load to check if the system gives the expected responses with
keeping the it stable for a long term
Load Test is
■ Basic form
■ Widely known-form
■ Specific amount of load
■ Checking the expected response time
■ Giving a result that users are facing
Image: https://images.app.goo.gl/KBysy7qsFPjkZ8Ai7
LOAD TEST
Mesut Güneş - www.testrisk.com
Stress test is to test the upper boundary of the system. When the load is increased to the
level of upper boundary, stress test aims to get the response of the system.
Stress Test is
■ Testing the upper boundary of the system
■ Needing more resources
■ Needing more investigation for boundaries
■ Needing more attention
■ Prone to break the system, aka: soak, endurance testing
■ Preparation for promotion like black friday, 11.11
Image: https://images.app.goo.gl/TVy8DzqnVN4NhCHA8
STRESS TEST
Mesut Güneş - www.testrisk.com
Soak test is to test the upper boundary of the system for a prolonged time. Soak is good if you are
not sure the expected amount of the user for some occasions.
Soak Test is
■ Testing the upper boundary of the system
■ Testing the system for a prolonged time
■ Needing more resources
■ Needing more investigation for boundaries
■ Needing more attention
■ Aims to break the system
■ Preparation for campaigns like black friday, 11.11
Eliud Kipchoge, Image: https://images.app.goo.gl/6FCD6U95h8jFWuXX9
SOAK-ENDURANCE TEST
Mesut Güneş - www.testrisk.com
Spike test is to test the behaviour of the system when the amount of load is suddenly increased
and decreased. It aims to find system failures when loads is changing to the unexpected amount.
Spike Test is
■ Testing the sudden increase and decrease of loads
■ Requiring more load generations
◂ depends of the tools (load the system, then spike it)
■ Good for some occasion like simulating
◂ push notifications for e-coms
◂ announcing critical news
Image: https://images.app.goo.gl/yPxGxZZYc2cuFto28
SPIKE TEST
Mesut Güneş - www.testrisk.com
Capacity testing is aiming to find the maximum amount of the user that the system can
handle. By this test we can find the how many user can use the system.
Capacity Test is
■ Testing the max user
■ Finding the behavior when more users join
■ Providing info about the loss of user data
Image: https://images.app.goo.gl/Y8vr2eNcrjne7Etx5
CAPACITY TEST
Mesut Güneş - www.testrisk.com
Volume test is testing the database directly instead of the whole system. With the volume
testing, we can find if there is any bottleneck with the database system.
Spike Test is
■ Testing the database
■ Testing the with large amount data
Image: https://images.app.goo.gl/EtQyUwUGqx5PCSda8
VOLUME TEST
Mesut Güneş - www.testrisk.com
WHAT IS AUTOMATED
PERFORMANCE TESTING
02
Mesut Güneş - www.testrisk.com
Automated testing is running the tests and reporting results by tools with scripts.
Automated performance testing is designing the performance test scenarios to run them
spontaneously by tools and evaluation the result by tools to decide to go or not to go
further.
Automated Performance Testing is
■ Subset of the performance test scenarios
■ Designed to run spontaneously by tools
■ Designed to evaluate the result by tools
■ Designed not to break the system
■ Having decision metrics, ex: max response time, max-average resp time, ...
■ Designed to create report for concurrent and historical run
AUTOMATED PERFORMANCE TESTING
Mesut Güneş - www.testrisk.com
Automated performance testing can be applied to the all types of performance testing.
However each types need different level of maturity and sanity.
Automated Performance Testing is
■ Easily applied to load testing
■ Hard to apply stress test, spike test, but have benefits
■ Very hard to apply Soak-Endurance test
WHAT TYPES TO AUTOMATE
Mesut Güneş - www.testrisk.com
Since the load test is aiming to response of the system under a specific load and it is
success is belong to the pre-defined metrics, load testing is the best suited performance
testing type.
Automated Load Testing is
■ Needing specific load level
■ Needing pre-defined metrics
■ Needing evaluation of the result
■ Needing exactly the same environment - only one thing can be testable
■ Needing tools and script knowledge
■ Easy to integrate CI/CD pipeline - everything is scripted
■ Reporting the performance of the system when something changes
AUTOMATED LOAD TESTING
Mesut Güneş - www.testrisk.com
METRICS
03
Mesut Güneş - www.testrisk.com
Performance testing is meaningful when the metrics are understandable for each counterparts. These
metrics are the key identifier for evaluating the results and deciding if the test is successful or failed.
Some of the Metrics are
■ Response Metrics
◂ Response time
◂ Average response time
◂ Peak response time
◂ Wait time
◂ Error rate
■ Volume Metrics
◂ Concurrent users
◂ Requests per second
◂ Throughput
METRICS
Mesut Güneş - www.testrisk.com
Response time is the main measurement taken during the test. Then we calculate the average, mean,
median, minimum, maximum values of it.
Variants of the Response Metrics are
■ Response time
◂ Time to complete a request to the system
◂ Time to First Byte (TtFB) - response starts
◂ Time to Last Byte (TtLB) - response ends
◂ Wait time is the time between sending request to TtFB
■ Average, Median, Peak response time
◂ Average is mean of the whole responses
◂ Median is the one in middle between min to max
◂ Peak is the maximum value
■ Error Rate
◂ # of Error / # of Request
RESPONSE METRICS
Mesut Güneş - www.testrisk.com
Volume related metrics are depends on the loads which are generated during the tests
by the tools. These metrics show how much loads was sent to the system and how
much response was receipt. Basically these are requests-per-seconds (RPS),
concurrent user, throughput, hatch rate
Variants of the Volume Metrics are
■ RPS is the number of request sending per second
■ Concurrent User is the number of virtual users which are testing the system
■ Hatch Rate is the number of virtual user adding to the system per second
■ Throughput is the data in kilobytes which are sent from the servers
VOLUME METRICS
TOOLS AND
TECHNOLOGIES
04
Mesut Güneş - www.testrisk.com
Performance testing depends two main parts. The first part is creating loads and the
second part is using these loads for test scenarios. When it comes to do automated
performance testing, we need more tools
Tools Needed for Automated Performance Testing are
■ Performance Testing tool
■ Databases
■ Reporting tools
■ Comparison tools
■ Orchestration Tools
TOOLS FOR AUTOMATED PERFORMANCE
TESTING
Mesut Güneş - www.testrisk.com
We have a variety of tools in the industry, they changes from open source to commercial and/or commercial
support; newly started to 20+ years old performance testing tools.
Some of the well-know Performance Tools are
■ Open source
◂ Jmeter - Apache project, v1.0 1998
◂ Gatling - Enterprise support by Frontline
◂ K6 - Enterprise support by LoadImpact
◂ Locust
◂ and many others
■ Commercial
◂ LoadRunner by Microfocus (previously Mercury - HP)
◂ Blazemeter - support multiple opensource tools
◂ LoadUI Pro by Smartbear
PERFORMANCE TESTING TOOLS
Mesut Güneş - www.testrisk.com
We need to manage these tools to run the test efficiently. Every CI/CD run on a
orchestration tool that provide every needed task by using different tools and scripts.
Some of the well-know Automation Tools are
■ Jenkins
■ TravisCI
■ TeamCity
■ CircleCI
■ Code Ship
■ Gitlab CI
AUTOMATION TOOLS
Mesut Güneş - www.testrisk.com
We need to create test environments, some environment for running performance
testing and also some environment to keeping data and reports. These environments
should be created
Some of the well-know Orchestration Tools are
■ Docker Compose
■ Kubernetes
■ Prometheus
■ Mesosphere DC/OS
■ And others
ORCHESTRATION TOOLS
Mesut Güneş - www.testrisk.com
THE WAYS OF
IMPLEMENTATIONS
05
Mesut Güneş - www.testrisk.com
K6 is an open source performance testing tool. It is designed for developers, it gives us
many good features to run tests in safer, faster, easier integrated way. Very easy to
integrate it to CI/CD.
Some of the Good Features of K6 are
■ Precious in performance, among the top 5 in comparison
■ Written in Golang, allows to write test script in Javascript
■ Already dockerized
■ Easy to connect to DB (such as InfluxDB)
■ Easy to create reports (Grafana)
■ Has build-in Thresholds
■ And many others
IMPLEMENTATION WITH K6
Mesut Güneş - www.testrisk.com
K6 has rich libraries that you can use in the script. Request is sending by http from
k6/http. Grouping is letting you to run same kind request in a group.
WRITE SCRIPT WITH K6
Mesut Güneş - www.testrisk.com
Thresholds is designed to define fail/pass criteria. With it you can define max, min,
average, median, throughput and other metrics.
THRESHOLDS - K6
Mesut Güneş - www.testrisk.com
Command line supports many parameters to run your scripts. For a load test, we have
fixed virtual user and fixed test duration so the run script should look like
RUN LOAD TEST WITH K6
Mesut Güneş - www.testrisk.com
For a spike test, we should load the system with nominal load and the load should
increase suddenly. Let’s focus on at the --stage option for this.
RUN SPIKE TEST WITH K6
Mesut Güneş - www.testrisk.com
Simple add your run script to Jenkins and run it.
JENKINS RUNNING K6
Mesut Güneş - www.testrisk.com
The K6 sends the results to the InfluxDB, we can virtualize this data with Grafana
INFLUXDB + GRAFANA FOR K6
Mesut Güneş - www.testrisk.com
BENEFITS
06
Mesut Güneş - www.testrisk.com
When the benefits of automated test composed of the benefits of performance testing it become
more delicious :)
Some benefits of automated performance testing are
■ Giving current performance of the app
■ Creating awareness about the performance of the system
■ Developers tends to miss performance point
■ Preventing last minute mistake
■ Giving history about the performance of the system
■ Making it easy to run performance testing on demand
Image: https://images.app.goo.gl/TVy8DzqnVN4NhCHA8
BENEFITS
CREDITS: This presentation template was created by Slidesgo,
including icons by Flaticon, and infographics & images by
Freepik.
Please keep this slide for attribution.
Mesut Güneş - www.testrisk.com
Does anyone have any
questions?
THANKS
References:
● https://www.anztb.org/userfiles/files/PerformanceTestingQLD0414.pdf
● https://www.theseus.fi/bitstream/handle/10024/110354/Joonas_Moilanen_Mervi_Jeskanen.pdf?sequence=1
● The Art of Software Testing, http://barbie.uta.edu/~mehra/Book1_The%20Art%20of%20Software%20Testing.pdf
● K6 manual, https://docs.k6.io/docs/welcome
● https://github.com/gunesmes/testhive-django-unittest-behave-selenium-newman-locust-jenkins
● http://www.testrisk.com/2015/09/performance-testing-on-ci-locust-is.html
● http://www.testrisk.com/2016/01/performance-testing-on-ci-integration.html

More Related Content

Recently uploaded

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 

Recently uploaded (20)

Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Automated Performance Testing with K6

  • 1. Istanbul November 22, 2019 TEST AUTOMATION & DIGITAL QA EVENT #TAS19
  • 2. Test the performance of the system when something changes AUTOMATED PERFORMANCE TESTING
  • 3. MESUT GÜNEŞ Senior Test Automation Engineer at VNGRS in/gunesmes gunesmes story/gunesmes gunesmes testrisk.com gunesmes@gmail.com
  • 4. Mesut Güneş - www.testrisk.com ■ Performance testing ■ Type of performance testing (load, stress, soak, volume, capacity, spike) ■ Automation, Tools, Technologies, ■ Benefits of Automated Tests ■ Integration ■ Thresholds, Percentile, rps ■ CI/CD ■ API ■ Orchestration ■ . . . and more TALK INCLUDE THESE TOPICS
  • 5. Mesut Güneş - www.testrisk.com TABLE OF CONTENTS WHAT IS PERFORMANCE TESTING Concept of performance AUTOMATED PERFORMANCE TESTING Concept of automation in terms of performance 01 03 02 04 05 06 METRICS What to know about the metrics during the performance testing TOOLS AND TECHNOLOGIES What kind of tools we have for this purpose THE WAYS OF IMPLEMENTATION How we can implement the automated performance tests BENEFITS What kind of benefits we can have
  • 7. Mesut Güneş - www.testrisk.com Defining the performance of the system by testing the functionalities of the system in terms of the non-functionalities Performance Testing is ■ A non-functional testing ■ Testing the functionalities of the system ■ Both black-box and white-box testing ■ Defining how the system works under any loads ■ Applied under different load levels ■ Applied under different load increments ■ Applied under different durations PERFORMANCE TESTING BY DEFINITION
  • 8. Mesut Güneş - www.testrisk.com Performance testing should be also executed in a process. Performance engineers should ensure that they collected requirements, created correct amount of virtual users, created test scenarios and they can execute them. As a final they should check the result and the system, if required after fixing, re-execution may be needed. PERFORMANCE TESTING BY PROCESS Planning Creating test Scripts Creating the Test Env. Executing the Tests Monitoring the Systems Analyzing & Optimizing
  • 9. Mesut Güneş - www.testrisk.com Types of performance testing depend on the strategy that applied during the test by means of the loads, the duration and increment of the load Types of Performance Testing is ■ Load ■ Stress ■ Soak ■ Spike ■ Volume ■ Capacity TYPES OF PERFORMANCE TESTING
  • 10. Mesut Güneş - www.testrisk.com Load test is to understand the behavior of the system under a specific load. It is performing under specific amount of the load to check if the system gives the expected responses with keeping the it stable for a long term Load Test is ■ Basic form ■ Widely known-form ■ Specific amount of load ■ Checking the expected response time ■ Giving a result that users are facing Image: https://images.app.goo.gl/KBysy7qsFPjkZ8Ai7 LOAD TEST
  • 11. Mesut Güneş - www.testrisk.com Stress test is to test the upper boundary of the system. When the load is increased to the level of upper boundary, stress test aims to get the response of the system. Stress Test is ■ Testing the upper boundary of the system ■ Needing more resources ■ Needing more investigation for boundaries ■ Needing more attention ■ Prone to break the system, aka: soak, endurance testing ■ Preparation for promotion like black friday, 11.11 Image: https://images.app.goo.gl/TVy8DzqnVN4NhCHA8 STRESS TEST
  • 12. Mesut Güneş - www.testrisk.com Soak test is to test the upper boundary of the system for a prolonged time. Soak is good if you are not sure the expected amount of the user for some occasions. Soak Test is ■ Testing the upper boundary of the system ■ Testing the system for a prolonged time ■ Needing more resources ■ Needing more investigation for boundaries ■ Needing more attention ■ Aims to break the system ■ Preparation for campaigns like black friday, 11.11 Eliud Kipchoge, Image: https://images.app.goo.gl/6FCD6U95h8jFWuXX9 SOAK-ENDURANCE TEST
  • 13. Mesut Güneş - www.testrisk.com Spike test is to test the behaviour of the system when the amount of load is suddenly increased and decreased. It aims to find system failures when loads is changing to the unexpected amount. Spike Test is ■ Testing the sudden increase and decrease of loads ■ Requiring more load generations ◂ depends of the tools (load the system, then spike it) ■ Good for some occasion like simulating ◂ push notifications for e-coms ◂ announcing critical news Image: https://images.app.goo.gl/yPxGxZZYc2cuFto28 SPIKE TEST
  • 14. Mesut Güneş - www.testrisk.com Capacity testing is aiming to find the maximum amount of the user that the system can handle. By this test we can find the how many user can use the system. Capacity Test is ■ Testing the max user ■ Finding the behavior when more users join ■ Providing info about the loss of user data Image: https://images.app.goo.gl/Y8vr2eNcrjne7Etx5 CAPACITY TEST
  • 15. Mesut Güneş - www.testrisk.com Volume test is testing the database directly instead of the whole system. With the volume testing, we can find if there is any bottleneck with the database system. Spike Test is ■ Testing the database ■ Testing the with large amount data Image: https://images.app.goo.gl/EtQyUwUGqx5PCSda8 VOLUME TEST
  • 16. Mesut Güneş - www.testrisk.com WHAT IS AUTOMATED PERFORMANCE TESTING 02
  • 17. Mesut Güneş - www.testrisk.com Automated testing is running the tests and reporting results by tools with scripts. Automated performance testing is designing the performance test scenarios to run them spontaneously by tools and evaluation the result by tools to decide to go or not to go further. Automated Performance Testing is ■ Subset of the performance test scenarios ■ Designed to run spontaneously by tools ■ Designed to evaluate the result by tools ■ Designed not to break the system ■ Having decision metrics, ex: max response time, max-average resp time, ... ■ Designed to create report for concurrent and historical run AUTOMATED PERFORMANCE TESTING
  • 18. Mesut Güneş - www.testrisk.com Automated performance testing can be applied to the all types of performance testing. However each types need different level of maturity and sanity. Automated Performance Testing is ■ Easily applied to load testing ■ Hard to apply stress test, spike test, but have benefits ■ Very hard to apply Soak-Endurance test WHAT TYPES TO AUTOMATE
  • 19. Mesut Güneş - www.testrisk.com Since the load test is aiming to response of the system under a specific load and it is success is belong to the pre-defined metrics, load testing is the best suited performance testing type. Automated Load Testing is ■ Needing specific load level ■ Needing pre-defined metrics ■ Needing evaluation of the result ■ Needing exactly the same environment - only one thing can be testable ■ Needing tools and script knowledge ■ Easy to integrate CI/CD pipeline - everything is scripted ■ Reporting the performance of the system when something changes AUTOMATED LOAD TESTING
  • 20. Mesut Güneş - www.testrisk.com METRICS 03
  • 21. Mesut Güneş - www.testrisk.com Performance testing is meaningful when the metrics are understandable for each counterparts. These metrics are the key identifier for evaluating the results and deciding if the test is successful or failed. Some of the Metrics are ■ Response Metrics ◂ Response time ◂ Average response time ◂ Peak response time ◂ Wait time ◂ Error rate ■ Volume Metrics ◂ Concurrent users ◂ Requests per second ◂ Throughput METRICS
  • 22. Mesut Güneş - www.testrisk.com Response time is the main measurement taken during the test. Then we calculate the average, mean, median, minimum, maximum values of it. Variants of the Response Metrics are ■ Response time ◂ Time to complete a request to the system ◂ Time to First Byte (TtFB) - response starts ◂ Time to Last Byte (TtLB) - response ends ◂ Wait time is the time between sending request to TtFB ■ Average, Median, Peak response time ◂ Average is mean of the whole responses ◂ Median is the one in middle between min to max ◂ Peak is the maximum value ■ Error Rate ◂ # of Error / # of Request RESPONSE METRICS
  • 23. Mesut Güneş - www.testrisk.com Volume related metrics are depends on the loads which are generated during the tests by the tools. These metrics show how much loads was sent to the system and how much response was receipt. Basically these are requests-per-seconds (RPS), concurrent user, throughput, hatch rate Variants of the Volume Metrics are ■ RPS is the number of request sending per second ■ Concurrent User is the number of virtual users which are testing the system ■ Hatch Rate is the number of virtual user adding to the system per second ■ Throughput is the data in kilobytes which are sent from the servers VOLUME METRICS
  • 25. Mesut Güneş - www.testrisk.com Performance testing depends two main parts. The first part is creating loads and the second part is using these loads for test scenarios. When it comes to do automated performance testing, we need more tools Tools Needed for Automated Performance Testing are ■ Performance Testing tool ■ Databases ■ Reporting tools ■ Comparison tools ■ Orchestration Tools TOOLS FOR AUTOMATED PERFORMANCE TESTING
  • 26. Mesut Güneş - www.testrisk.com We have a variety of tools in the industry, they changes from open source to commercial and/or commercial support; newly started to 20+ years old performance testing tools. Some of the well-know Performance Tools are ■ Open source ◂ Jmeter - Apache project, v1.0 1998 ◂ Gatling - Enterprise support by Frontline ◂ K6 - Enterprise support by LoadImpact ◂ Locust ◂ and many others ■ Commercial ◂ LoadRunner by Microfocus (previously Mercury - HP) ◂ Blazemeter - support multiple opensource tools ◂ LoadUI Pro by Smartbear PERFORMANCE TESTING TOOLS
  • 27. Mesut Güneş - www.testrisk.com We need to manage these tools to run the test efficiently. Every CI/CD run on a orchestration tool that provide every needed task by using different tools and scripts. Some of the well-know Automation Tools are ■ Jenkins ■ TravisCI ■ TeamCity ■ CircleCI ■ Code Ship ■ Gitlab CI AUTOMATION TOOLS
  • 28. Mesut Güneş - www.testrisk.com We need to create test environments, some environment for running performance testing and also some environment to keeping data and reports. These environments should be created Some of the well-know Orchestration Tools are ■ Docker Compose ■ Kubernetes ■ Prometheus ■ Mesosphere DC/OS ■ And others ORCHESTRATION TOOLS
  • 29. Mesut Güneş - www.testrisk.com THE WAYS OF IMPLEMENTATIONS 05
  • 30. Mesut Güneş - www.testrisk.com K6 is an open source performance testing tool. It is designed for developers, it gives us many good features to run tests in safer, faster, easier integrated way. Very easy to integrate it to CI/CD. Some of the Good Features of K6 are ■ Precious in performance, among the top 5 in comparison ■ Written in Golang, allows to write test script in Javascript ■ Already dockerized ■ Easy to connect to DB (such as InfluxDB) ■ Easy to create reports (Grafana) ■ Has build-in Thresholds ■ And many others IMPLEMENTATION WITH K6
  • 31. Mesut Güneş - www.testrisk.com K6 has rich libraries that you can use in the script. Request is sending by http from k6/http. Grouping is letting you to run same kind request in a group. WRITE SCRIPT WITH K6
  • 32. Mesut Güneş - www.testrisk.com Thresholds is designed to define fail/pass criteria. With it you can define max, min, average, median, throughput and other metrics. THRESHOLDS - K6
  • 33. Mesut Güneş - www.testrisk.com Command line supports many parameters to run your scripts. For a load test, we have fixed virtual user and fixed test duration so the run script should look like RUN LOAD TEST WITH K6
  • 34. Mesut Güneş - www.testrisk.com For a spike test, we should load the system with nominal load and the load should increase suddenly. Let’s focus on at the --stage option for this. RUN SPIKE TEST WITH K6
  • 35. Mesut Güneş - www.testrisk.com Simple add your run script to Jenkins and run it. JENKINS RUNNING K6
  • 36. Mesut Güneş - www.testrisk.com The K6 sends the results to the InfluxDB, we can virtualize this data with Grafana INFLUXDB + GRAFANA FOR K6
  • 37. Mesut Güneş - www.testrisk.com BENEFITS 06
  • 38. Mesut Güneş - www.testrisk.com When the benefits of automated test composed of the benefits of performance testing it become more delicious :) Some benefits of automated performance testing are ■ Giving current performance of the app ■ Creating awareness about the performance of the system ■ Developers tends to miss performance point ■ Preventing last minute mistake ■ Giving history about the performance of the system ■ Making it easy to run performance testing on demand Image: https://images.app.goo.gl/TVy8DzqnVN4NhCHA8 BENEFITS
  • 39. CREDITS: This presentation template was created by Slidesgo, including icons by Flaticon, and infographics & images by Freepik. Please keep this slide for attribution. Mesut Güneş - www.testrisk.com Does anyone have any questions? THANKS References: ● https://www.anztb.org/userfiles/files/PerformanceTestingQLD0414.pdf ● https://www.theseus.fi/bitstream/handle/10024/110354/Joonas_Moilanen_Mervi_Jeskanen.pdf?sequence=1 ● The Art of Software Testing, http://barbie.uta.edu/~mehra/Book1_The%20Art%20of%20Software%20Testing.pdf ● K6 manual, https://docs.k6.io/docs/welcome ● https://github.com/gunesmes/testhive-django-unittest-behave-selenium-newman-locust-jenkins ● http://www.testrisk.com/2015/09/performance-testing-on-ci-locust-is.html ● http://www.testrisk.com/2016/01/performance-testing-on-ci-integration.html