SlideShare a Scribd company logo
Improving the Testing Efficiency of
Selenium-based Load Tests
Thanh H.D. Nguyen, Parminder Flora
Shahnaz Shariff Ahmed E. HassanHeng Li Cor-Paul Bezemer
Load-related problems can have catastrophic
consequences
2
Load testing is used to determine a system’s
behavior under various load conditions
3
Concurrent
requests
System
Under Test
System
behavior
Usually load tests are conducted with
protocol-level tools (e.g., JMeter)
4
RequestsProtocol
level
requests
generator Feedback
System under test
Advantages of browser-based testing frameworks
(e.g., Selenium) over protocol-level testing
frameworks
5
Simulate user interactions with browsersUses protocol-level HTTP requests
Difficult to abstract complex behavior
(e.g., a secure login)
Cannot execute JavaScript in web
applications
Require dedicated load testing scripts Reuse functional testing scripts
Easily handle complex behavior (e.g., a
secure login)
Can execute JavaScript in web applications
Protocol-
level testing
Browser-based
testing
Traditionally, a browser is used to
generate the load for one user
6
System under test
Requests
Load driver
Selenium-based load tests are resource-heavy
7
Selenium-based load tests are resource-heavy
System under test
Requests
A normal load driver
can only simulate a
few users
Load driver
Selenium users are concerned about the performance
issues in Selenium-based load tests
8
We propose an approach to improve the testing
efficiency of Selenium-based load tests
9Load driver
Simulate more users
on a load driver
Load driver
Sharing browsers between
users
We use a webmail client (Roundcube) as our
application under test
10
We create test cases based on the MMB3
benchmark
11
● Reply email
● Reply all
● Send email
● Forward email
● Delete email
● View emails
● Browse contacts
● Permanently delete
MMB3 is a popular benchmark
used to measure the performance
of mail servers
MMB3 simulates a typical user’s
email actions during a working
day
In the MMB3 benchmark, 295 tasks are
scheduled to run in a 8-hour working day
12
We run 19 tasks in a 30-minute period
(reduced execution time & same intensity of tasks)
Send Email Delete Email Browse Contacts … Task# 295
Reply All View Emails Delete Email … Task# 295
Browse Contacts Reply … Task# 295Forward Email
8 hours
We run Selenium tests with
three different browser settings
13
Regular browser
E.g.; Google Chrome
Headless browser
A simplified browser
without a Graphical
User Interface
Xvfb
A regular browser
with its display
transferred to an in-
memory display
Traditionally, a browser is launched for
each user instance
14
T1: Send Email T2: Delete Email T3: Browse Contacts … Task#19
T1: Reply All T2: View Emails T3: Delete Email … Task#19
T1: Browse Contacts T2: Reply … Task#19T3: Forward Email
30 mins
We merge the tasks of all users to
form a common list of tasks
15
We use fewer browsers to simulate
the workload of more users
16
A pool of browsers parallelly run the tasks
from the common list
17
…
Pool of browsers
Randomly select a free
browser from the pool
Common list of tasks
…
Select the next task from
the common list
Run the selected task on
the selected browser
Release the selected
browser back to the pool
The process is running in
multi-threads
(the number of threads =
the number of browses)
We use error ratio, delay ratio and resource
usage to measure test efficiency
18
We use error ratio (0%) and delay ratio (<5%) to find the
maximum workload (i.e., # of error-free users)
that a load driver can generate
Delay Ratio
The ratio of tasks that
miss the scheduled
starting time
Error Ratio
The ratio of failed
tasks in a test run
Resource Usage:
CPU & Memory of
the testing processes
Headless browsers are much more efficient than
regular browsers
19
49
92
5
8
CPU & memory is significant even in
idle browser instances
20
Comparing the resource usage of idle and busy browsers for a period of 10 mins
95th Percentile Memory
With headless browsers, our approach
significantly reduces the system’s memory usage
21
With Xvfb browsers, our approach reduces the
system’s memory usage significantly
22
Our approach increases the number of
error-free users by at least 20%
23
Selenium-based load tests are resource-heavy
Selenium-based load tests are resource-heavy
System under test
Requests
A normal load driver can
only simulate a few users
Load driver
We propose an approach to improve the testing
efficiency of Selenium-based load tests
25Load driver
Simulate more users
on a load driver
Load driver
Sharing browsers between
users
We use a webmail client (Roundcube) as our
application under test
Our approach increases the number of
error-free users by at least 20%
27
Shahnaz M. Shariff
s.shariff@queensu.ca

More Related Content

What's hot

Hybrid framework for test automation
Hybrid framework for test automationHybrid framework for test automation
Hybrid framework for test automation
srivinayak
 
Query Management system-Iv review
Query Management system-Iv reviewQuery Management system-Iv review
Query Management system-Iv review
logeshprabu
 

What's hot (20)

Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
 
The complete guide for software integration testing | David Tzemach
The complete guide for software integration testing | David TzemachThe complete guide for software integration testing | David Tzemach
The complete guide for software integration testing | David Tzemach
 
Measure performance of the application using open source performance testing...
Measure performance of the  application using open source performance testing...Measure performance of the  application using open source performance testing...
Measure performance of the application using open source performance testing...
 
Hybrid framework for test automation
Hybrid framework for test automationHybrid framework for test automation
Hybrid framework for test automation
 
Query Management system-Iv review
Query Management system-Iv reviewQuery Management system-Iv review
Query Management system-Iv review
 
Can we do performance testing manually
Can we do performance testing manuallyCan we do performance testing manually
Can we do performance testing manually
 
Selenium and JMeter
Selenium and JMeterSelenium and JMeter
Selenium and JMeter
 
Selenium and JMeter Testing
Selenium and JMeter TestingSelenium and JMeter Testing
Selenium and JMeter Testing
 
Qa process
Qa processQa process
Qa process
 
Automation Using Selenium Webdriver
Automation Using Selenium WebdriverAutomation Using Selenium Webdriver
Automation Using Selenium Webdriver
 
What is Integration Testing? | Edureka
What is Integration Testing? | EdurekaWhat is Integration Testing? | Edureka
What is Integration Testing? | Edureka
 
Ijetcas14 413
Ijetcas14 413Ijetcas14 413
Ijetcas14 413
 
Testing of Microservices in a Cloud Environment
Testing of Microservices in a Cloud EnvironmentTesting of Microservices in a Cloud Environment
Testing of Microservices in a Cloud Environment
 
Automation framework using selenium webdriver with java
Automation framework using selenium webdriver with javaAutomation framework using selenium webdriver with java
Automation framework using selenium webdriver with java
 
Load Testing and JMeter Presentation
Load Testing and JMeter PresentationLoad Testing and JMeter Presentation
Load Testing and JMeter Presentation
 
Why does Selenium Succeed?
Why does Selenium Succeed?Why does Selenium Succeed?
Why does Selenium Succeed?
 
Selenium ppt
Selenium pptSelenium ppt
Selenium ppt
 
Mobile Test Automation Framework : Presented By Shankar Garg
Mobile Test Automation Framework : Presented By Shankar GargMobile Test Automation Framework : Presented By Shankar Garg
Mobile Test Automation Framework : Presented By Shankar Garg
 
Ajit jadhav automation_qa_4_ yrs
Ajit jadhav automation_qa_4_ yrsAjit jadhav automation_qa_4_ yrs
Ajit jadhav automation_qa_4_ yrs
 
Software Engineering
Software EngineeringSoftware Engineering
Software Engineering
 

Similar to Improving the testing efficiency of selenium-based load tests

Performance testing jmeter
Performance testing jmeterPerformance testing jmeter
Performance testing jmeter
Bhojan Rajan
 
Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02
Nitish Bhardwaj
 
Performance Test Plan - Sample 1
Performance Test Plan - Sample 1Performance Test Plan - Sample 1
Performance Test Plan - Sample 1
Atul Pant
 

Similar to Improving the testing efficiency of selenium-based load tests (20)

Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02Performancetestingjmeter 121109061704-phpapp02
Performancetestingjmeter 121109061704-phpapp02
 
Load testing jmeter
Load testing jmeterLoad testing jmeter
Load testing jmeter
 
Performance testing jmeter
Performance testing jmeterPerformance testing jmeter
Performance testing jmeter
 
Performance testing and j meter
Performance testing and j meterPerformance testing and j meter
Performance testing and j meter
 
Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02Performancetestingjmeter 131210111657-phpapp02
Performancetestingjmeter 131210111657-phpapp02
 
Performance Testing
Performance TestingPerformance Testing
Performance Testing
 
ICSE2017 - Analytics Driven Load Testing: An Industrial Experience Report on ...
ICSE2017 - Analytics Driven Load Testing: An Industrial Experience Report on ...ICSE2017 - Analytics Driven Load Testing: An Industrial Experience Report on ...
ICSE2017 - Analytics Driven Load Testing: An Industrial Experience Report on ...
 
Performance Testing using LoadRunner
Performance Testing using LoadRunnerPerformance Testing using LoadRunner
Performance Testing using LoadRunner
 
Gatling workshop lets test17
Gatling workshop lets test17Gatling workshop lets test17
Gatling workshop lets test17
 
JMETER-SKILLWISE
JMETER-SKILLWISEJMETER-SKILLWISE
JMETER-SKILLWISE
 
28791456 web-testing
28791456 web-testing28791456 web-testing
28791456 web-testing
 
QSpiders - Introduction to HP Load Runner
QSpiders - Introduction to HP Load RunnerQSpiders - Introduction to HP Load Runner
QSpiders - Introduction to HP Load Runner
 
Less11 3 e_loadmodule_1
Less11 3 e_loadmodule_1Less11 3 e_loadmodule_1
Less11 3 e_loadmodule_1
 
Performance Test Plan - Sample 1
Performance Test Plan - Sample 1Performance Test Plan - Sample 1
Performance Test Plan - Sample 1
 
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
 
Performance Testing
Performance TestingPerformance Testing
Performance Testing
 
Test Automation Framework Online Training by QuontraSolutions
Test Automation Framework Online Training by QuontraSolutionsTest Automation Framework Online Training by QuontraSolutions
Test Automation Framework Online Training by QuontraSolutions
 
Performance testing
Performance testingPerformance testing
Performance testing
 
Performance testing basics
Performance testing basicsPerformance testing basics
Performance testing basics
 
JMeter
JMeterJMeter
JMeter
 

More from SAIL_QU

Studying the Integration Practices and the Evolution of Ad Libraries in the G...
Studying the Integration Practices and the Evolution of Ad Libraries in the G...Studying the Integration Practices and the Evolution of Ad Libraries in the G...
Studying the Integration Practices and the Evolution of Ad Libraries in the G...
SAIL_QU
 
Studying User-Developer Interactions Through the Distribution and Reviewing M...
Studying User-Developer Interactions Through the Distribution and Reviewing M...Studying User-Developer Interactions Through the Distribution and Reviewing M...
Studying User-Developer Interactions Through the Distribution and Reviewing M...
SAIL_QU
 
Studying online distribution platforms for games through the mining of data f...
Studying online distribution platforms for games through the mining of data f...Studying online distribution platforms for games through the mining of data f...
Studying online distribution platforms for games through the mining of data f...
SAIL_QU
 
Understanding the Factors for Fast Answers in Technical Q&A Websites: An Empi...
Understanding the Factors for Fast Answers in Technical Q&A Websites: An Empi...Understanding the Factors for Fast Answers in Technical Q&A Websites: An Empi...
Understanding the Factors for Fast Answers in Technical Q&A Websites: An Empi...
SAIL_QU
 
Mining Development Knowledge to Understand and Support Software Logging Pract...
Mining Development Knowledge to Understand and Support Software Logging Pract...Mining Development Knowledge to Understand and Support Software Logging Pract...
Mining Development Knowledge to Understand and Support Software Logging Pract...
SAIL_QU
 

More from SAIL_QU (20)

Studying the Integration Practices and the Evolution of Ad Libraries in the G...
Studying the Integration Practices and the Evolution of Ad Libraries in the G...Studying the Integration Practices and the Evolution of Ad Libraries in the G...
Studying the Integration Practices and the Evolution of Ad Libraries in the G...
 
Studying the Dialogue Between Users and Developers of Free Apps in the Google...
Studying the Dialogue Between Users and Developers of Free Apps in the Google...Studying the Dialogue Between Users and Developers of Free Apps in the Google...
Studying the Dialogue Between Users and Developers of Free Apps in the Google...
 
Studying User-Developer Interactions Through the Distribution and Reviewing M...
Studying User-Developer Interactions Through the Distribution and Reviewing M...Studying User-Developer Interactions Through the Distribution and Reviewing M...
Studying User-Developer Interactions Through the Distribution and Reviewing M...
 
Studying online distribution platforms for games through the mining of data f...
Studying online distribution platforms for games through the mining of data f...Studying online distribution platforms for games through the mining of data f...
Studying online distribution platforms for games through the mining of data f...
 
Understanding the Factors for Fast Answers in Technical Q&A Websites: An Empi...
Understanding the Factors for Fast Answers in Technical Q&A Websites: An Empi...Understanding the Factors for Fast Answers in Technical Q&A Websites: An Empi...
Understanding the Factors for Fast Answers in Technical Q&A Websites: An Empi...
 
Mining Development Knowledge to Understand and Support Software Logging Pract...
Mining Development Knowledge to Understand and Support Software Logging Pract...Mining Development Knowledge to Understand and Support Software Logging Pract...
Mining Development Knowledge to Understand and Support Software Logging Pract...
 
Which Log Level Should Developers Choose For a New Logging Statement?
Which Log Level Should Developers Choose For a New Logging Statement?Which Log Level Should Developers Choose For a New Logging Statement?
Which Log Level Should Developers Choose For a New Logging Statement?
 
Towards Just-in-Time Suggestions for Log Changes
Towards Just-in-Time Suggestions for Log ChangesTowards Just-in-Time Suggestions for Log Changes
Towards Just-in-Time Suggestions for Log Changes
 
The Impact of Task Granularity on Co-evolution Analyses
The Impact of Task Granularity on Co-evolution AnalysesThe Impact of Task Granularity on Co-evolution Analyses
The Impact of Task Granularity on Co-evolution Analyses
 
A Framework for Evaluating the Results of the SZZ Approach for Identifying Bu...
A Framework for Evaluating the Results of the SZZ Approach for Identifying Bu...A Framework for Evaluating the Results of the SZZ Approach for Identifying Bu...
A Framework for Evaluating the Results of the SZZ Approach for Identifying Bu...
 
How are Discussions Associated with Bug Reworking? An Empirical Study on Open...
How are Discussions Associated with Bug Reworking? An Empirical Study on Open...How are Discussions Associated with Bug Reworking? An Empirical Study on Open...
How are Discussions Associated with Bug Reworking? An Empirical Study on Open...
 
A Study of the Relation of Mobile Device Attributes with the User-Perceived Q...
A Study of the Relation of Mobile Device Attributes with the User-Perceived Q...A Study of the Relation of Mobile Device Attributes with the User-Perceived Q...
A Study of the Relation of Mobile Device Attributes with the User-Perceived Q...
 
A Large-Scale Study of the Impact of Feature Selection Techniques on Defect C...
A Large-Scale Study of the Impact of Feature Selection Techniques on Defect C...A Large-Scale Study of the Impact of Feature Selection Techniques on Defect C...
A Large-Scale Study of the Impact of Feature Selection Techniques on Defect C...
 
Studying the Dialogue Between Users and Developers of Free Apps in the Google...
Studying the Dialogue Between Users and Developers of Free Apps in the Google...Studying the Dialogue Between Users and Developers of Free Apps in the Google...
Studying the Dialogue Between Users and Developers of Free Apps in the Google...
 
What Do Programmers Know about Software Energy Consumption?
What Do Programmers Know about Software Energy Consumption?What Do Programmers Know about Software Energy Consumption?
What Do Programmers Know about Software Energy Consumption?
 
Threshold for Size and Complexity Metrics: A Case Study from the Perspective ...
Threshold for Size and Complexity Metrics: A Case Study from the Perspective ...Threshold for Size and Complexity Metrics: A Case Study from the Perspective ...
Threshold for Size and Complexity Metrics: A Case Study from the Perspective ...
 
Revisiting the Experimental Design Choices for Approaches for the Automated R...
Revisiting the Experimental Design Choices for Approaches for the Automated R...Revisiting the Experimental Design Choices for Approaches for the Automated R...
Revisiting the Experimental Design Choices for Approaches for the Automated R...
 
Measuring Program Comprehension: A Large-Scale Field Study with Professionals
Measuring Program Comprehension: A Large-Scale Field Study with ProfessionalsMeasuring Program Comprehension: A Large-Scale Field Study with Professionals
Measuring Program Comprehension: A Large-Scale Field Study with Professionals
 
On the Unreliability of Bug Severity Data
On the Unreliability of Bug Severity DataOn the Unreliability of Bug Severity Data
On the Unreliability of Bug Severity Data
 
On the Link Between Mobile App Quality and User Reviews
On the Link Between Mobile App Quality and User ReviewsOn the Link Between Mobile App Quality and User Reviews
On the Link Between Mobile App Quality and User Reviews
 

Recently uploaded

RNA INTERFERENCE: UNRAVELING GENETIC SILENCING
RNA INTERFERENCE: UNRAVELING GENETIC SILENCINGRNA INTERFERENCE: UNRAVELING GENETIC SILENCING
RNA INTERFERENCE: UNRAVELING GENETIC SILENCING
AADYARAJPANDEY1
 
Aerodynamics. flippatterncn5tm5ttnj6nmnynyppt
Aerodynamics. flippatterncn5tm5ttnj6nmnynypptAerodynamics. flippatterncn5tm5ttnj6nmnynyppt
Aerodynamics. flippatterncn5tm5ttnj6nmnynyppt
sreddyrahul
 
Detectability of Solar Panels as a Technosignature
Detectability of Solar Panels as a TechnosignatureDetectability of Solar Panels as a Technosignature
Detectability of Solar Panels as a Technosignature
Sérgio Sacani
 
FAIR & AI Ready KGs for Explainable Predictions
FAIR & AI Ready KGs for Explainable PredictionsFAIR & AI Ready KGs for Explainable Predictions
FAIR & AI Ready KGs for Explainable Predictions
Michel Dumontier
 
ESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptxESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptx
muralinath2
 
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
muralinath2
 
Pests of Green Manures_Bionomics_IPM_Dr.UPR.pdf
Pests of Green Manures_Bionomics_IPM_Dr.UPR.pdfPests of Green Manures_Bionomics_IPM_Dr.UPR.pdf
Pests of Green Manures_Bionomics_IPM_Dr.UPR.pdf
PirithiRaju
 

Recently uploaded (20)

Lab report on liquid viscosity of glycerin
Lab report on liquid viscosity of glycerinLab report on liquid viscosity of glycerin
Lab report on liquid viscosity of glycerin
 
RNA INTERFERENCE: UNRAVELING GENETIC SILENCING
RNA INTERFERENCE: UNRAVELING GENETIC SILENCINGRNA INTERFERENCE: UNRAVELING GENETIC SILENCING
RNA INTERFERENCE: UNRAVELING GENETIC SILENCING
 
Topography and sediments of the floor of the Bay of Bengal
Topography and sediments of the floor of the Bay of BengalTopography and sediments of the floor of the Bay of Bengal
Topography and sediments of the floor of the Bay of Bengal
 
Richard's entangled aventures in wonderland
Richard's entangled aventures in wonderlandRichard's entangled aventures in wonderland
Richard's entangled aventures in wonderland
 
GEOLOGICAL FIELD REPORT On Kaptai Rangamati Road-Cut Section.pdf
GEOLOGICAL FIELD REPORT  On  Kaptai Rangamati Road-Cut Section.pdfGEOLOGICAL FIELD REPORT  On  Kaptai Rangamati Road-Cut Section.pdf
GEOLOGICAL FIELD REPORT On Kaptai Rangamati Road-Cut Section.pdf
 
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
Astronomy Update- Curiosity’s exploration of Mars _ Local Briefs _ leadertele...
 
Aerodynamics. flippatterncn5tm5ttnj6nmnynyppt
Aerodynamics. flippatterncn5tm5ttnj6nmnynypptAerodynamics. flippatterncn5tm5ttnj6nmnynyppt
Aerodynamics. flippatterncn5tm5ttnj6nmnynyppt
 
THE IMPORTANCE OF MARTIAN ATMOSPHERE SAMPLE RETURN.
THE IMPORTANCE OF MARTIAN ATMOSPHERE SAMPLE RETURN.THE IMPORTANCE OF MARTIAN ATMOSPHERE SAMPLE RETURN.
THE IMPORTANCE OF MARTIAN ATMOSPHERE SAMPLE RETURN.
 
The ASGCT Annual Meeting was packed with exciting progress in the field advan...
The ASGCT Annual Meeting was packed with exciting progress in the field advan...The ASGCT Annual Meeting was packed with exciting progress in the field advan...
The ASGCT Annual Meeting was packed with exciting progress in the field advan...
 
Hemoglobin metabolism: C Kalyan & E. Muralinath
Hemoglobin metabolism: C Kalyan & E. MuralinathHemoglobin metabolism: C Kalyan & E. Muralinath
Hemoglobin metabolism: C Kalyan & E. Muralinath
 
NuGOweek 2024 full programme - hosted by Ghent University
NuGOweek 2024 full programme - hosted by Ghent UniversityNuGOweek 2024 full programme - hosted by Ghent University
NuGOweek 2024 full programme - hosted by Ghent University
 
NuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final versionNuGOweek 2024 Ghent - programme - final version
NuGOweek 2024 Ghent - programme - final version
 
Detectability of Solar Panels as a Technosignature
Detectability of Solar Panels as a TechnosignatureDetectability of Solar Panels as a Technosignature
Detectability of Solar Panels as a Technosignature
 
FAIR & AI Ready KGs for Explainable Predictions
FAIR & AI Ready KGs for Explainable PredictionsFAIR & AI Ready KGs for Explainable Predictions
FAIR & AI Ready KGs for Explainable Predictions
 
ESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptxESR_factors_affect-clinic significance-Pathysiology.pptx
ESR_factors_affect-clinic significance-Pathysiology.pptx
 
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATIONPRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
PRESENTATION ABOUT PRINCIPLE OF COSMATIC EVALUATION
 
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
Circulatory system_ Laplace law. Ohms law.reynaults law,baro-chemo-receptors-...
 
Pests of Green Manures_Bionomics_IPM_Dr.UPR.pdf
Pests of Green Manures_Bionomics_IPM_Dr.UPR.pdfPests of Green Manures_Bionomics_IPM_Dr.UPR.pdf
Pests of Green Manures_Bionomics_IPM_Dr.UPR.pdf
 
Structures and textures of metamorphic rocks
Structures and textures of metamorphic rocksStructures and textures of metamorphic rocks
Structures and textures of metamorphic rocks
 
GLOBAL AND LOCAL SCENARIO OF FOOD AND NUTRITION.pptx
GLOBAL AND LOCAL SCENARIO OF FOOD AND NUTRITION.pptxGLOBAL AND LOCAL SCENARIO OF FOOD AND NUTRITION.pptx
GLOBAL AND LOCAL SCENARIO OF FOOD AND NUTRITION.pptx
 

Improving the testing efficiency of selenium-based load tests

  • 1. Improving the Testing Efficiency of Selenium-based Load Tests Thanh H.D. Nguyen, Parminder Flora Shahnaz Shariff Ahmed E. HassanHeng Li Cor-Paul Bezemer
  • 2. Load-related problems can have catastrophic consequences 2
  • 3. Load testing is used to determine a system’s behavior under various load conditions 3 Concurrent requests System Under Test System behavior
  • 4. Usually load tests are conducted with protocol-level tools (e.g., JMeter) 4 RequestsProtocol level requests generator Feedback System under test
  • 5. Advantages of browser-based testing frameworks (e.g., Selenium) over protocol-level testing frameworks 5 Simulate user interactions with browsersUses protocol-level HTTP requests Difficult to abstract complex behavior (e.g., a secure login) Cannot execute JavaScript in web applications Require dedicated load testing scripts Reuse functional testing scripts Easily handle complex behavior (e.g., a secure login) Can execute JavaScript in web applications Protocol- level testing Browser-based testing
  • 6. Traditionally, a browser is used to generate the load for one user 6 System under test Requests Load driver
  • 7. Selenium-based load tests are resource-heavy 7 Selenium-based load tests are resource-heavy System under test Requests A normal load driver can only simulate a few users Load driver
  • 8. Selenium users are concerned about the performance issues in Selenium-based load tests 8
  • 9. We propose an approach to improve the testing efficiency of Selenium-based load tests 9Load driver Simulate more users on a load driver Load driver Sharing browsers between users
  • 10. We use a webmail client (Roundcube) as our application under test 10
  • 11. We create test cases based on the MMB3 benchmark 11 ● Reply email ● Reply all ● Send email ● Forward email ● Delete email ● View emails ● Browse contacts ● Permanently delete MMB3 is a popular benchmark used to measure the performance of mail servers MMB3 simulates a typical user’s email actions during a working day
  • 12. In the MMB3 benchmark, 295 tasks are scheduled to run in a 8-hour working day 12 We run 19 tasks in a 30-minute period (reduced execution time & same intensity of tasks) Send Email Delete Email Browse Contacts … Task# 295 Reply All View Emails Delete Email … Task# 295 Browse Contacts Reply … Task# 295Forward Email 8 hours
  • 13. We run Selenium tests with three different browser settings 13 Regular browser E.g.; Google Chrome Headless browser A simplified browser without a Graphical User Interface Xvfb A regular browser with its display transferred to an in- memory display
  • 14. Traditionally, a browser is launched for each user instance 14 T1: Send Email T2: Delete Email T3: Browse Contacts … Task#19 T1: Reply All T2: View Emails T3: Delete Email … Task#19 T1: Browse Contacts T2: Reply … Task#19T3: Forward Email 30 mins
  • 15. We merge the tasks of all users to form a common list of tasks 15
  • 16. We use fewer browsers to simulate the workload of more users 16
  • 17. A pool of browsers parallelly run the tasks from the common list 17 … Pool of browsers Randomly select a free browser from the pool Common list of tasks … Select the next task from the common list Run the selected task on the selected browser Release the selected browser back to the pool The process is running in multi-threads (the number of threads = the number of browses)
  • 18. We use error ratio, delay ratio and resource usage to measure test efficiency 18 We use error ratio (0%) and delay ratio (<5%) to find the maximum workload (i.e., # of error-free users) that a load driver can generate Delay Ratio The ratio of tasks that miss the scheduled starting time Error Ratio The ratio of failed tasks in a test run Resource Usage: CPU & Memory of the testing processes
  • 19. Headless browsers are much more efficient than regular browsers 19 49 92 5 8
  • 20. CPU & memory is significant even in idle browser instances 20 Comparing the resource usage of idle and busy browsers for a period of 10 mins 95th Percentile Memory
  • 21. With headless browsers, our approach significantly reduces the system’s memory usage 21
  • 22. With Xvfb browsers, our approach reduces the system’s memory usage significantly 22
  • 23. Our approach increases the number of error-free users by at least 20% 23
  • 24. Selenium-based load tests are resource-heavy Selenium-based load tests are resource-heavy System under test Requests A normal load driver can only simulate a few users Load driver
  • 25. We propose an approach to improve the testing efficiency of Selenium-based load tests 25Load driver Simulate more users on a load driver Load driver Sharing browsers between users
  • 26. We use a webmail client (Roundcube) as our application under test
  • 27. Our approach increases the number of error-free users by at least 20% 27