SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
How to Make Your UI Tests
Stable, Scalable, and
Maintainable
2
SmartBear’s technology stack
3
Quick Intro
Nikhil Kaul Jeffrey Martin
4
On our plate today
1
Why you shouldn't tolerate flakiness?
2
Common reasons for flaky UI tests
4
What to do with flaky UI tests?
5
How to separate signal from noise?
3
How to overcome these challenges?
5
Flaky tests shouldn't be tolerated
• 300 tests
• Each test has .5% failure rate
• Pass rate for each tests: 99.5%
• Pass rate for the suite: (99.5%)^300 = 22.23%
6
Understand the nature of flakiness
Tech ComplexitiesTest EnviromentTest DataTest Design
7
Understand the nature of flakiness
Tech ComplexitiesTest EnviromentTest DataTest Design
8
Don’t interact with UI elements directly
Test services seperately from the UI
Use page objects
Automate at three levels
‒ Unit
‒ Service
‒ UI
Use UI encapsulation Build modular test design
‒ Identify user journeys
‒ Unit
‒ Service
‒ UI
Automate at three levels
Use UI encapsulation
‒ Page Objects
UIServiceUnit
9
How to implement in real world
Add Item
Click on an item with name XYZ
Clickitem()
Set element with name ABC to quantity Z
Set element()
Click on button labeled place in cart
clickbutton()
What? How?
10
Understand the nature of flakiness
Tech ComplexitiesTest EnviromentTest DataTest Design
11
Separate the test data from test design
Test services seperately from the UI
Use page objects
Automate at three levels
‒ Unit
‒ Service
‒ UI
Use page objects Build modular test design
– Test specific data
– Reference dataLimit data
dependency
between tests
Tests should run
independently
Using databases
‒ Conduct tests
inside a transaction
12
Understand the nature of flakiness
Tech ComplexitiesTest EnviromentTest DataTest Design
13
Limit your dependency on environments
Test services seperately from the UI
Use page objects
Automate at three levels
‒ Unit
‒ Service
‒ UI
Use page objects Build modular test design
‒ Application API
‒ HTML API
‒ Identify user journeys
Limit calls to external systems
Parameterize connections
Hermetic Servers
14
Understand the nature of flakiness
Tech ComplexitiesTest EnviromentTest DataTest Design
15
Automate at three levels
‒ Unit
‒ Service
‒ UI
Use page objects
Build modular test design‒ Application API
‒ HTML API
Limit calls to external systems
Parameterize connections
Hermetic Servers
Technical complexities can be overcome
AJAX Calls
‒ Callback
‒ Polling Interval
‒ WaitUntil
No Response Calls
‒ Fake objects
‒ Mock
‒ Virtual Service
16
Acceptance test builds should never be red
Separate flaky
from healthy tests
Limit the number of tests as well
as the time
17
Use statistics for measuring test stability
Sample Size (N)
• 50
Desired confidence (α)
• 95% confidence
P
• 29/50 = .58
1-p
• 21/50
𝐵𝑖𝑛𝑜𝑚𝑖𝑎𝑙 𝐶𝐼 = 𝑝 ± z1−α 2
𝑝(1 − p)
n
𝐶𝐼 = .58 ± 1.96
.58(1 − .58)
50
𝐶𝐼 = .58 ± .14
𝐶𝐼 = between 44% and 72%.
±z1−α 2 = . ±z.95 = 1.96
18
Takeaways
1
Flaky tests shouldn't be tolerated
2
Understand the nature of flakiness
4
Use statistics for measuring test stability
3
Acceptance test builds should never be red
Questions?

Contenu connexe

Tendances

Cross functional peer review preso 10-01-2013
Cross functional peer review preso 10-01-2013Cross functional peer review preso 10-01-2013
Cross functional peer review preso 10-01-2013
SmartBear
 
Ciprian balea automated performance-testing
Ciprian balea   automated performance-testingCiprian balea   automated performance-testing
Ciprian balea automated performance-testing
Romania Testing
 
Why Automation is Required in Software Testing - OSSCamp 2014
Why Automation is Required in Software Testing - OSSCamp 2014Why Automation is Required in Software Testing - OSSCamp 2014
Why Automation is Required in Software Testing - OSSCamp 2014
OSSCube
 

Tendances (20)

Test Design + Environment Management: Scaling UI Automation for Agile
Test Design + Environment Management: Scaling UI Automation for AgileTest Design + Environment Management: Scaling UI Automation for Agile
Test Design + Environment Management: Scaling UI Automation for Agile
 
Manual, Visual, and Automated Testing For Web Apps
Manual, Visual, and Automated Testing For Web AppsManual, Visual, and Automated Testing For Web Apps
Manual, Visual, and Automated Testing For Web Apps
 
[TAQfull Meetup] Angie Jones + Expert Panel: Best Practices in Quality Manage...
[TAQfull Meetup] Angie Jones + Expert Panel: Best Practices in Quality Manage...[TAQfull Meetup] Angie Jones + Expert Panel: Best Practices in Quality Manage...
[TAQfull Meetup] Angie Jones + Expert Panel: Best Practices in Quality Manage...
 
"Software Quality in the Service of Innovation in the Insurance Industry"
"Software Quality in the Service of Innovation in the Insurance Industry""Software Quality in the Service of Innovation in the Insurance Industry"
"Software Quality in the Service of Innovation in the Insurance Industry"
 
Bringing Quality Design Systems to Life with Storybook & Applitools
Bringing Quality Design Systems to Life with Storybook & ApplitoolsBringing Quality Design Systems to Life with Storybook & Applitools
Bringing Quality Design Systems to Life with Storybook & Applitools
 
Cross functional peer review preso 10-01-2013
Cross functional peer review preso 10-01-2013Cross functional peer review preso 10-01-2013
Cross functional peer review preso 10-01-2013
 
BDD along with Continuous Integration
BDD along with Continuous IntegrationBDD along with Continuous Integration
BDD along with Continuous Integration
 
ATAGTR2017 Wearable App Testing
ATAGTR2017 Wearable App TestingATAGTR2017 Wearable App Testing
ATAGTR2017 Wearable App Testing
 
Cross-Browser-Testing with Protractor & Browserstack
Cross-Browser-Testing with Protractor & BrowserstackCross-Browser-Testing with Protractor & Browserstack
Cross-Browser-Testing with Protractor & Browserstack
 
Amalgamation of BDD, parallel execution and mobile automation
Amalgamation of BDD, parallel execution and mobile automationAmalgamation of BDD, parallel execution and mobile automation
Amalgamation of BDD, parallel execution and mobile automation
 
Tutorial on the integration of Selenium with cucumber for experts and fresher’s
Tutorial on the integration of Selenium with cucumber for experts and fresher’sTutorial on the integration of Selenium with cucumber for experts and fresher’s
Tutorial on the integration of Selenium with cucumber for experts and fresher’s
 
ASP.NET & Unit Testing
ASP.NET & Unit TestingASP.NET & Unit Testing
ASP.NET & Unit Testing
 
Compatibility testing
Compatibility testingCompatibility testing
Compatibility testing
 
Applitools Framework
Applitools  FrameworkApplitools  Framework
Applitools Framework
 
Functional to Visual: AI-powered UI Testing from Testim and Applitools
Functional to Visual: AI-powered UI Testing from Testim and ApplitoolsFunctional to Visual: AI-powered UI Testing from Testim and Applitools
Functional to Visual: AI-powered UI Testing from Testim and Applitools
 
Selenium and Cucumber Automation Services
Selenium and Cucumber Automation ServicesSelenium and Cucumber Automation Services
Selenium and Cucumber Automation Services
 
Ciprian balea automated performance-testing
Ciprian balea   automated performance-testingCiprian balea   automated performance-testing
Ciprian balea automated performance-testing
 
Why Automation is Required in Software Testing - OSSCamp 2014
Why Automation is Required in Software Testing - OSSCamp 2014Why Automation is Required in Software Testing - OSSCamp 2014
Why Automation is Required in Software Testing - OSSCamp 2014
 
Funny stories and anti-patterns from DevOps landscape
Funny stories and anti-patterns from DevOps landscapeFunny stories and anti-patterns from DevOps landscape
Funny stories and anti-patterns from DevOps landscape
 
AUTOMATION FRAMEWORK USING SELENIUM & TESTNG ALONG WITH MAVEN
AUTOMATION FRAMEWORK USING SELENIUM & TESTNG ALONG WITH MAVENAUTOMATION FRAMEWORK USING SELENIUM & TESTNG ALONG WITH MAVEN
AUTOMATION FRAMEWORK USING SELENIUM & TESTNG ALONG WITH MAVEN
 

Similaire à How to Make Your UI Tests Stable, Scalable, and Maintainable

Priyanka_3.5years_Resume
Priyanka_3.5years_ResumePriyanka_3.5years_Resume
Priyanka_3.5years_Resume
Priyanka Banda
 
Bhabani Shankar Behera_CV
Bhabani Shankar Behera_CVBhabani Shankar Behera_CV
Bhabani Shankar Behera_CV
chiku134
 
Stop guessing, start testing – mobile testing done right - Timo Euteneuer
Stop guessing, start testing – mobile testing done right - Timo EuteneuerStop guessing, start testing – mobile testing done right - Timo Euteneuer
Stop guessing, start testing – mobile testing done right - Timo Euteneuer
JAXLondon_Conference
 
Clean & Dirty Acceptance Tests with Cucumber & Watir
Clean & Dirty Acceptance Tests with Cucumber & WatirClean & Dirty Acceptance Tests with Cucumber & Watir
Clean & Dirty Acceptance Tests with Cucumber & Watir
Danny Smith
 
Automated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra SolutionsAutomated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra Solutions
Quontra Solutions
 

Similaire à How to Make Your UI Tests Stable, Scalable, and Maintainable (20)

Test Automation: Investment Today Pays Back Tomorrow
Test Automation: Investment Today Pays Back TomorrowTest Automation: Investment Today Pays Back Tomorrow
Test Automation: Investment Today Pays Back Tomorrow
 
Service Virtualization: What Testers Need to Know
Service Virtualization: What Testers Need to KnowService Virtualization: What Testers Need to Know
Service Virtualization: What Testers Need to Know
 
Testing Applications—For the Cloud and in the Cloud
Testing Applications—For the Cloud and in the CloudTesting Applications—For the Cloud and in the Cloud
Testing Applications—For the Cloud and in the Cloud
 
Mobile test automation perfecto star east
Mobile test automation perfecto star eastMobile test automation perfecto star east
Mobile test automation perfecto star east
 
Continuous Testing through Service Virtualization
Continuous Testing through Service VirtualizationContinuous Testing through Service Virtualization
Continuous Testing through Service Virtualization
 
Continuous Testing through Service Virtualization
Continuous Testing through Service VirtualizationContinuous Testing through Service Virtualization
Continuous Testing through Service Virtualization
 
Priyanka_3.5years_Resume
Priyanka_3.5years_ResumePriyanka_3.5years_Resume
Priyanka_3.5years_Resume
 
Bhabani Shankar Behera_CV
Bhabani Shankar Behera_CVBhabani Shankar Behera_CV
Bhabani Shankar Behera_CV
 
Mobile Testing
Mobile TestingMobile Testing
Mobile Testing
 
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
 
Triple Assurance: AI-Powered Test Automation in UI Design and Functionality
Triple Assurance: AI-Powered Test Automation in UI Design and FunctionalityTriple Assurance: AI-Powered Test Automation in UI Design and Functionality
Triple Assurance: AI-Powered Test Automation in UI Design and Functionality
 
Stop guessing, start testing – mobile testing done right - Timo Euteneuer
Stop guessing, start testing – mobile testing done right - Timo EuteneuerStop guessing, start testing – mobile testing done right - Timo Euteneuer
Stop guessing, start testing – mobile testing done right - Timo Euteneuer
 
Clean & Dirty Acceptance Tests with Cucumber & Watir
Clean & Dirty Acceptance Tests with Cucumber & WatirClean & Dirty Acceptance Tests with Cucumber & Watir
Clean & Dirty Acceptance Tests with Cucumber & Watir
 
Testing microservices
Testing microservicesTesting microservices
Testing microservices
 
Enhancing Quality and Test in Medical Device Design - Part 2.pdf
Enhancing Quality and Test in Medical Device Design - Part 2.pdfEnhancing Quality and Test in Medical Device Design - Part 2.pdf
Enhancing Quality and Test in Medical Device Design - Part 2.pdf
 
WE-06-Testing.ppt
WE-06-Testing.pptWE-06-Testing.ppt
WE-06-Testing.ppt
 
Automated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra SolutionsAutomated Software Testing Framework Training by Quontra Solutions
Automated Software Testing Framework Training by Quontra Solutions
 
An Automation Culture: The Key to Agile Success
An Automation Culture: The Key to Agile SuccessAn Automation Culture: The Key to Agile Success
An Automation Culture: The Key to Agile Success
 
Beyond Traditional Mobile Testing
Beyond Traditional Mobile TestingBeyond Traditional Mobile Testing
Beyond Traditional Mobile Testing
 
Creating a successful continuous testing environment by Eran Kinsbruner
Creating a successful continuous testing environment by Eran KinsbrunerCreating a successful continuous testing environment by Eran Kinsbruner
Creating a successful continuous testing environment by Eran Kinsbruner
 

Plus de SmartBear

Plus de SmartBear (20)

Enforcing Your Organization's API Design Standards with SwaggerHub
Enforcing Your Organization's API Design Standards with SwaggerHubEnforcing Your Organization's API Design Standards with SwaggerHub
Enforcing Your Organization's API Design Standards with SwaggerHub
 
Introducing OpenAPI Version 3.1
Introducing OpenAPI Version 3.1Introducing OpenAPI Version 3.1
Introducing OpenAPI Version 3.1
 
IATA Open Air: How API Standardization Enables Innovation in the Airline Indu...
IATA Open Air: How API Standardization Enables Innovation in the Airline Indu...IATA Open Air: How API Standardization Enables Innovation in the Airline Indu...
IATA Open Air: How API Standardization Enables Innovation in the Airline Indu...
 
The State of API 2020 Webinar – Exploring Trends, Tools & Takeaways to Drive ...
The State of API 2020 Webinar – Exploring Trends, Tools & Takeaways to Drive ...The State of API 2020 Webinar – Exploring Trends, Tools & Takeaways to Drive ...
The State of API 2020 Webinar – Exploring Trends, Tools & Takeaways to Drive ...
 
How LISI Automotive Accelerated Application Delivery with SwaggerHub
How LISI Automotive Accelerated Application Delivery with SwaggerHubHow LISI Automotive Accelerated Application Delivery with SwaggerHub
How LISI Automotive Accelerated Application Delivery with SwaggerHub
 
Standardising APIs: Powering the Platform Economy in Financial Services
Standardising APIs: Powering the Platform Economy in Financial ServicesStandardising APIs: Powering the Platform Economy in Financial Services
Standardising APIs: Powering the Platform Economy in Financial Services
 
Getting Started with API Standardization in SwaggerHub
Getting Started with API Standardization in SwaggerHubGetting Started with API Standardization in SwaggerHub
Getting Started with API Standardization in SwaggerHub
 
Adopting a Design-First Approach to API Development with SwaggerHub
Adopting a Design-First Approach to API Development with SwaggerHubAdopting a Design-First Approach to API Development with SwaggerHub
Adopting a Design-First Approach to API Development with SwaggerHub
 
Standardizing APIs Across Your Organization with Swagger and OAS | A SmartBea...
Standardizing APIs Across Your Organization with Swagger and OAS | A SmartBea...Standardizing APIs Across Your Organization with Swagger and OAS | A SmartBea...
Standardizing APIs Across Your Organization with Swagger and OAS | A SmartBea...
 
Effective API Lifecycle Management
Effective API Lifecycle Management Effective API Lifecycle Management
Effective API Lifecycle Management
 
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
 
The API Lifecycle Series: Evolving API Development and Testing from Open Sour...
The API Lifecycle Series: Evolving API Development and Testing from Open Sour...The API Lifecycle Series: Evolving API Development and Testing from Open Sour...
The API Lifecycle Series: Evolving API Development and Testing from Open Sour...
 
Artificial intelligence for faster and smarter software testing - Galway Mee...
Artificial intelligence for faster and smarter software testing  - Galway Mee...Artificial intelligence for faster and smarter software testing  - Galway Mee...
Artificial intelligence for faster and smarter software testing - Galway Mee...
 
Successfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile WorldSuccessfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile World
 
The Best Kept Secrets of Code Review | SmartBear Webinar
The Best Kept Secrets of Code Review | SmartBear WebinarThe Best Kept Secrets of Code Review | SmartBear Webinar
The Best Kept Secrets of Code Review | SmartBear Webinar
 
How Capital One Scaled API Design to Deliver New Products Faster
How Capital One Scaled API Design to Deliver New Products FasterHow Capital One Scaled API Design to Deliver New Products Faster
How Capital One Scaled API Design to Deliver New Products Faster
 
Testing Without a GUI Using TestComplete
 Testing Without a GUI Using TestComplete Testing Without a GUI Using TestComplete
Testing Without a GUI Using TestComplete
 
Hidden Treasure - TestComplete Script Extensions
Hidden Treasure - TestComplete Script ExtensionsHidden Treasure - TestComplete Script Extensions
Hidden Treasure - TestComplete Script Extensions
 
How Bdd Can Save Agile
 How Bdd Can Save Agile How Bdd Can Save Agile
How Bdd Can Save Agile
 
API Automation and TDD to Implement Master Data Survivorship Rules
API Automation and TDD to Implement Master Data Survivorship RulesAPI Automation and TDD to Implement Master Data Survivorship Rules
API Automation and TDD to Implement Master Data Survivorship Rules
 

Dernier

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Dernier (20)

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
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.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
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
%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
 
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 🔝✔️✔️
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
%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
 
%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
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
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 🔝✔️✔️
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 

How to Make Your UI Tests Stable, Scalable, and Maintainable

  • 1. How to Make Your UI Tests Stable, Scalable, and Maintainable
  • 3. 3 Quick Intro Nikhil Kaul Jeffrey Martin
  • 4. 4 On our plate today 1 Why you shouldn't tolerate flakiness? 2 Common reasons for flaky UI tests 4 What to do with flaky UI tests? 5 How to separate signal from noise? 3 How to overcome these challenges?
  • 5. 5 Flaky tests shouldn't be tolerated • 300 tests • Each test has .5% failure rate • Pass rate for each tests: 99.5% • Pass rate for the suite: (99.5%)^300 = 22.23%
  • 6. 6 Understand the nature of flakiness Tech ComplexitiesTest EnviromentTest DataTest Design
  • 7. 7 Understand the nature of flakiness Tech ComplexitiesTest EnviromentTest DataTest Design
  • 8. 8 Don’t interact with UI elements directly Test services seperately from the UI Use page objects Automate at three levels ‒ Unit ‒ Service ‒ UI Use UI encapsulation Build modular test design ‒ Identify user journeys ‒ Unit ‒ Service ‒ UI Automate at three levels Use UI encapsulation ‒ Page Objects UIServiceUnit
  • 9. 9 How to implement in real world Add Item Click on an item with name XYZ Clickitem() Set element with name ABC to quantity Z Set element() Click on button labeled place in cart clickbutton() What? How?
  • 10. 10 Understand the nature of flakiness Tech ComplexitiesTest EnviromentTest DataTest Design
  • 11. 11 Separate the test data from test design Test services seperately from the UI Use page objects Automate at three levels ‒ Unit ‒ Service ‒ UI Use page objects Build modular test design – Test specific data – Reference dataLimit data dependency between tests Tests should run independently Using databases ‒ Conduct tests inside a transaction
  • 12. 12 Understand the nature of flakiness Tech ComplexitiesTest EnviromentTest DataTest Design
  • 13. 13 Limit your dependency on environments Test services seperately from the UI Use page objects Automate at three levels ‒ Unit ‒ Service ‒ UI Use page objects Build modular test design ‒ Application API ‒ HTML API ‒ Identify user journeys Limit calls to external systems Parameterize connections Hermetic Servers
  • 14. 14 Understand the nature of flakiness Tech ComplexitiesTest EnviromentTest DataTest Design
  • 15. 15 Automate at three levels ‒ Unit ‒ Service ‒ UI Use page objects Build modular test design‒ Application API ‒ HTML API Limit calls to external systems Parameterize connections Hermetic Servers Technical complexities can be overcome AJAX Calls ‒ Callback ‒ Polling Interval ‒ WaitUntil No Response Calls ‒ Fake objects ‒ Mock ‒ Virtual Service
  • 16. 16 Acceptance test builds should never be red Separate flaky from healthy tests Limit the number of tests as well as the time
  • 17. 17 Use statistics for measuring test stability Sample Size (N) • 50 Desired confidence (α) • 95% confidence P • 29/50 = .58 1-p • 21/50 𝐵𝑖𝑛𝑜𝑚𝑖𝑎𝑙 𝐶𝐼 = 𝑝 ± z1−α 2 𝑝(1 − p) n 𝐶𝐼 = .58 ± 1.96 .58(1 − .58) 50 𝐶𝐼 = .58 ± .14 𝐶𝐼 = between 44% and 72%. ±z1−α 2 = . ±z.95 = 1.96
  • 18. 18 Takeaways 1 Flaky tests shouldn't be tolerated 2 Understand the nature of flakiness 4 Use statistics for measuring test stability 3 Acceptance test builds should never be red