SlideShare a Scribd company logo
How to make your
functional tests really
quick
Mikalai Alimenkou
http://xpinjection.com
@xpinjection
How to make your functional tests really quick
How to make your functional tests really quick
Everybody likes Selenium Grid
WTF?!?
But our tests
depend on each
other… 
Performance tips
Tip #1: Data independent tests
• Most dependencies are data related
• Dependent tests = no parallel execution
• Data should be test specific with no reuse
• Use small focused datasets
Test data generation techniques
• Use Registry with counter to generate unique
data
• Fill database with large amount of data and
use reservation
• Use database sharding on application side
• Shard data by unique key (user name, email,
etc.) and insert data sets with DbUnit
Tip #2: Pool of resources
• Manage browsers pool of needed size
• Close browsers in background
• Login in background before take a browser for
test
• Use direct sessions instead of login
• Round robin technique between several nodes
Tip #3: Atomic focused tests
• Small test has clear goal and easy to
understand
• Easy to divide in suites
• Flexible running in multiple stages
• Report failures are easier to understand
• Run quickly so higher level of parallelization
Tip #4: Test only functionality
• Don’t pay attention on design and content
• Simplify everything except functionality under
test
• Run complex tests in reliable browsers
Tip #5: Generate app state
• Insert data directly in data storage
• Don’t use complex UI to generate state
• Use small isolated datasets and simple tools
Tip #6: Test widgets in isolation
• Create unit tests for JavaScript code
• Load widget on empty page and test it well
• Try to use reliable widgets library
Tip #7: Isolate all third-parties
• Use quick fake email server
• Mock all external services
• Switch all third-party components in quick
predictable mode
• Run everything locally
Use HTTP proxy for tests
• Blacklist external resources (Facebook, Twitter,
Ads, etc.)
• Cache images and other nonfunctional
resources
• Collect HTTP traffic for analysis (404, redirects,
loading time, etc.)
• Speedup page loading
Tip #8: Use smart waiting
• Every delay is multiplied by number of tests
• Don’t use speed and pauses at all
• Use implicit waits carefully
• Always think about the worst scenario and set
good timeouts
Tip #9: Monitor your tests
• Use CI server to gather time metrics
• Check trends to select slow tests
• Spend some time to improve them regularly
• Set max allowed tests execution time and try
to achieve it
@xpinjection
http://xpinjection.com
mikalai.alimenkou@xpinjection.com

More Related Content

PPTX
Hibernate, how the magic is really done
PDF
Architecture of automated test cases for legacy applications
PPTX
Cypress workshop for JSFoo 2019
PPTX
Introduction to cypress in Angular (Chinese)
PDF
Cypress - Best Practices
PDF
Automated testing with Cypress
PPTX
Protractor training
PDF
Practical Tips & Tricks for Selenium Test Automation
Hibernate, how the magic is really done
Architecture of automated test cases for legacy applications
Cypress workshop for JSFoo 2019
Introduction to cypress in Angular (Chinese)
Cypress - Best Practices
Automated testing with Cypress
Protractor training
Practical Tips & Tricks for Selenium Test Automation

What's hot (20)

PDF
Automated Web Testing using JavaScript
PPTX
Better End-to-End Testing with Page Objects Model using Protractor
PPTX
Protractor overview
PDF
How to Use Selenium, Successfully
PPTX
Hibernate performance tuning
PPTX
TGT#13 - UI Tests Automation Framework in Evolve EDM – Case Study - Mateusz R...
PDF
UI Testing Automation
PDF
Testing Code.org's Interactive CS Curriculum
PPTX
Cypress first impressions
PPTX
Protractor survival guide
PPTX
Automation using Javascript
PPTX
Moving From a Selenium Grid to the Cloud - A Real Life Story
PDF
AngularJS and Protractor
PDF
SeleniumCamp 2015 Andrii Soldatenko
PPTX
Making Watir and Cucumber an efficient tool for Web UI Automation
PPTX
Automated Testing using JavaScript
PPTX
Helpful Automation Techniques - Selenium Camp 2014
PDF
Drupal 7 ci and testing
PPTX
UI Testing Automation - Alex Kalinovsky - CreamTec LLC
PPTX
Protractor Tutorial Quality in Agile 2015
Automated Web Testing using JavaScript
Better End-to-End Testing with Page Objects Model using Protractor
Protractor overview
How to Use Selenium, Successfully
Hibernate performance tuning
TGT#13 - UI Tests Automation Framework in Evolve EDM – Case Study - Mateusz R...
UI Testing Automation
Testing Code.org's Interactive CS Curriculum
Cypress first impressions
Protractor survival guide
Automation using Javascript
Moving From a Selenium Grid to the Cloud - A Real Life Story
AngularJS and Protractor
SeleniumCamp 2015 Andrii Soldatenko
Making Watir and Cucumber an efficient tool for Web UI Automation
Automated Testing using JavaScript
Helpful Automation Techniques - Selenium Camp 2014
Drupal 7 ci and testing
UI Testing Automation - Alex Kalinovsky - CreamTec LLC
Protractor Tutorial Quality in Agile 2015
Ad

Viewers also liked (20)

PPTX
Why testing take so long
PPTX
Do you know what you are testing?
PPTX
5 top pain points of test automation
PPTX
Бытовая классификация тестировщиков с точки зрения разработчика
PPTX
How QA engineers could affect quality?
PPTX
Java 8, the Good, the Bad and the Ugly
PPTX
Java concurrency in practice
PPTX
Design patterns in test automation
PPT
Sonar quality
PPTX
The modern view on implementation of classic design patterns in Java
PPTX
Distributed automation selcamp2016
ODP
Fast web acceptance testing with selenium-grid
PDF
SQA Days 11 SAtroschenkov SBerezhnoy
PPT
Сергей Слесарев, Отличия в работе тестировщика в software-development компани...
PPTX
QA Fest 2015. Михаил Дырда. Мозг, как инструмент обучения!
PPTX
How to work with Selenium Grid: a quick walkthrough
PDF
QA Fest 2015. Игорь Хрол. Тестировщик в Agile - кто это?
PPTX
Autoscaled Distributed Automation using AWS at Selenium London MeetUp
PPTX
Роль TestOps: расширяем традиционные обязанности тестировщика
PDF
Selenium Gridで遊ぼう
Why testing take so long
Do you know what you are testing?
5 top pain points of test automation
Бытовая классификация тестировщиков с точки зрения разработчика
How QA engineers could affect quality?
Java 8, the Good, the Bad and the Ugly
Java concurrency in practice
Design patterns in test automation
Sonar quality
The modern view on implementation of classic design patterns in Java
Distributed automation selcamp2016
Fast web acceptance testing with selenium-grid
SQA Days 11 SAtroschenkov SBerezhnoy
Сергей Слесарев, Отличия в работе тестировщика в software-development компани...
QA Fest 2015. Михаил Дырда. Мозг, как инструмент обучения!
How to work with Selenium Grid: a quick walkthrough
QA Fest 2015. Игорь Хрол. Тестировщик в Agile - кто это?
Autoscaled Distributed Automation using AWS at Selenium London MeetUp
Роль TestOps: расширяем традиционные обязанности тестировщика
Selenium Gridで遊ぼう
Ad

Similar to How to make your functional tests really quick (20)

PDF
How to Make Your UI Tests Stable, Scalable, and Maintainable
PPTX
Performance Best Practices - Part 1 - Client Side [JS, CSS, HTML, jQuery]
PPTX
30 JavaScript optimization tips
PPTX
Automated UI Testing Done Right (QMSDNUG)
PPTX
Automated UI testing done right (DDDSydney)
PDF
Change Tyres In A Moving Car - Make Functional Test Automation Effective Keynote
PPT
Browser based testing
PPTX
UI Tests Are Fun To Write (If You Write Them Right)
PPTX
Java script performance tips
PDF
Comprehensive Performance Testing: From Early Dev to Live Production
PPTX
DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
PDF
Gatling - Bordeaux JUG
PDF
Opticon 2015-Scaling Your Testing Program for Maximum Impact
PPTX
DSL, Page Object и WebDriver – путь к надежным функциональным тестам
PPTX
Reaching for Your Quality Stretch Goals: Testing at Realtor.com
PDF
Gabriel carabat a healthy approach for test automation
PDF
Implementing Test Automation in Agile Projects
PPT
Ajax Testing Approach
PPT
Ajax Testing Approach
PDF
Webapp Automation Testing of performance marketing and media platform
How to Make Your UI Tests Stable, Scalable, and Maintainable
Performance Best Practices - Part 1 - Client Side [JS, CSS, HTML, jQuery]
30 JavaScript optimization tips
Automated UI Testing Done Right (QMSDNUG)
Automated UI testing done right (DDDSydney)
Change Tyres In A Moving Car - Make Functional Test Automation Effective Keynote
Browser based testing
UI Tests Are Fun To Write (If You Write Them Right)
Java script performance tips
Comprehensive Performance Testing: From Early Dev to Live Production
DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
Gatling - Bordeaux JUG
Opticon 2015-Scaling Your Testing Program for Maximum Impact
DSL, Page Object и WebDriver – путь к надежным функциональным тестам
Reaching for Your Quality Stretch Goals: Testing at Realtor.com
Gabriel carabat a healthy approach for test automation
Implementing Test Automation in Agile Projects
Ajax Testing Approach
Ajax Testing Approach
Webapp Automation Testing of performance marketing and media platform

More from Mikalai Alimenkou (20)

PPTX
Rise and fall of Story Points. Capacity based planning from the trenches.
PPTX
Static analysis tools as the best friend of QA
PPTX
Modern CI/CD in the microservices world with Kubernetes
PPTX
Saga about distributed business transactions in microservices world
PPTX
Effectiveness tips from Kubernetes trenches by Captain Obvious
PPTX
Ride the database in JUnit tests with Database Rider
PPTX
Wastful waste or why everything is so slow in development
PPTX
Hexagonal architecture with Spring Boot
PPTX
Wastful waste or why everything is so slow in development
PPTX
DevOps checklist or how to understand where is your team in DevOps landscape ...
PPTX
DevOps checklist or how to understand where is your team in DevOps landscape
PDF
Практические трудности в разработке Медкарты для целой страны
PPTX
Hexagonal architecture with Spring Boot [EPAM Java online conference]
PPTX
Bro, manage test data like a pro! [QA Fest 2018]
PPTX
Agile antipatterns: review after 10 years of practice
PPTX
Hexagonal architecture with Spring Boot
PPTX
Bro, manage test data like a pro!
PPTX
Бытовая классификация тестировщиков с точки зрения разработчика
PPTX
Code Review tool for personal effectiveness and waste analysis
PDF
Funny stories and anti-patterns from DevOps landscape
Rise and fall of Story Points. Capacity based planning from the trenches.
Static analysis tools as the best friend of QA
Modern CI/CD in the microservices world with Kubernetes
Saga about distributed business transactions in microservices world
Effectiveness tips from Kubernetes trenches by Captain Obvious
Ride the database in JUnit tests with Database Rider
Wastful waste or why everything is so slow in development
Hexagonal architecture with Spring Boot
Wastful waste or why everything is so slow in development
DevOps checklist or how to understand where is your team in DevOps landscape ...
DevOps checklist or how to understand where is your team in DevOps landscape
Практические трудности в разработке Медкарты для целой страны
Hexagonal architecture with Spring Boot [EPAM Java online conference]
Bro, manage test data like a pro! [QA Fest 2018]
Agile antipatterns: review after 10 years of practice
Hexagonal architecture with Spring Boot
Bro, manage test data like a pro!
Бытовая классификация тестировщиков с точки зрения разработчика
Code Review tool for personal effectiveness and waste analysis
Funny stories and anti-patterns from DevOps landscape

Recently uploaded (20)

PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Cloud computing and distributed systems.
PDF
Electronic commerce courselecture one. Pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Approach and Philosophy of On baking technology
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Advanced Soft Computing BINUS July 2025.pdf
PDF
Advanced IT Governance
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Network Security Unit 5.pdf for BCA BBA.
Cloud computing and distributed systems.
Electronic commerce courselecture one. Pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
GamePlan Trading System Review: Professional Trader's Honest Take
Per capita expenditure prediction using model stacking based on satellite ima...
The AUB Centre for AI in Media Proposal.docx
[발표본] 너의 과제는 클라우드에 있어_KTDS_김동현_20250524.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
NewMind AI Weekly Chronicles - August'25 Week I
Approach and Philosophy of On baking technology
20250228 LYD VKU AI Blended-Learning.pptx
Big Data Technologies - Introduction.pptx
NewMind AI Monthly Chronicles - July 2025
The Rise and Fall of 3GPP – Time for a Sabbatical?
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Advanced Soft Computing BINUS July 2025.pdf
Advanced IT Governance

How to make your functional tests really quick

  • 1. How to make your functional tests really quick Mikalai Alimenkou http://xpinjection.com @xpinjection
  • 5. WTF?!? But our tests depend on each other… 
  • 7. Tip #1: Data independent tests • Most dependencies are data related • Dependent tests = no parallel execution • Data should be test specific with no reuse • Use small focused datasets
  • 8. Test data generation techniques • Use Registry with counter to generate unique data • Fill database with large amount of data and use reservation • Use database sharding on application side • Shard data by unique key (user name, email, etc.) and insert data sets with DbUnit
  • 9. Tip #2: Pool of resources • Manage browsers pool of needed size • Close browsers in background • Login in background before take a browser for test • Use direct sessions instead of login • Round robin technique between several nodes
  • 10. Tip #3: Atomic focused tests • Small test has clear goal and easy to understand • Easy to divide in suites • Flexible running in multiple stages • Report failures are easier to understand • Run quickly so higher level of parallelization
  • 11. Tip #4: Test only functionality • Don’t pay attention on design and content • Simplify everything except functionality under test • Run complex tests in reliable browsers
  • 12. Tip #5: Generate app state • Insert data directly in data storage • Don’t use complex UI to generate state • Use small isolated datasets and simple tools
  • 13. Tip #6: Test widgets in isolation • Create unit tests for JavaScript code • Load widget on empty page and test it well • Try to use reliable widgets library
  • 14. Tip #7: Isolate all third-parties • Use quick fake email server • Mock all external services • Switch all third-party components in quick predictable mode • Run everything locally
  • 15. Use HTTP proxy for tests • Blacklist external resources (Facebook, Twitter, Ads, etc.) • Cache images and other nonfunctional resources • Collect HTTP traffic for analysis (404, redirects, loading time, etc.) • Speedup page loading
  • 16. Tip #8: Use smart waiting • Every delay is multiplied by number of tests • Don’t use speed and pauses at all • Use implicit waits carefully • Always think about the worst scenario and set good timeouts
  • 17. Tip #9: Monitor your tests • Use CI server to gather time metrics • Check trends to select slow tests • Spend some time to improve them regularly • Set max allowed tests execution time and try to achieve it