SlideShare une entreprise Scribd logo
1  sur  43
Automated Web UI
     Testing
    Mikalai Alimenkou
  http://xpinjection.com
       @xpinjection
Do you need UI testing?
Ugly design = bad
user experience
Some sites can lose money
Think about design as
non-functional requirement
May be just do it manually?



Large number       Many
   of pages      browsers
Not all layout bugs are so visible
Navigation through all pages is very useful for all types of testing

NAVIGATION TESTS WITH
WEBDRIVER
Why WebDriver?
•   Works with many browsers
•   Can handle window size and browser settings
•   Clear and simple API
•   Allow to execute JavaScript
How do navigation tests work?
 Preconfigured                  Define all
 environment                   pages from
                              requirements




   Reference
                                      Wait for
   database      Load in series
                                    READY state
Types of UI testing


           Image
          analysis

     Screenshot based




     Static (HTML, CSS,
         JavaScript)
Well structured page has better chances to be displayed correctly

STATIC ANALYSIS TECHNIQUES
How to access page?
•   Filter in Java for static HTML
•   Lightweight proxy server
•   HtmlWebDriver
•   Real browsers to make things realistic:
     • work with user agents
     • browser specific headers
     • dynamic pages
Existing solutions for Java
• http://www.rexsl.com/rexsl-w3c/ - API for
  W3C validators
• https://code.google.com/p/w3c-markup-
  validation-filter/ - validation Filter
DEMO TIME!
DEMO TIME!
Useful techniques


• Disable everything you don’t want to validate
• Disable ads, banners, images to make
everything quicker
• Static CSS may be validated on server
HTTP proxy for statistics




  https://github.com/webmetrics/browsermob-proxy
What can you get from
                       HTTP proxy?
• External resources integration status
  (Facebook, Twitter, Ads, etc.)
• Images, banners, ads and other nonfunctional
  resources
• Collect HTTP traffic for analysis (404, redirects,
  loading time, etc.)
Net panel in Firebug
Export statistics and reports




http://www.softwareishard.com/blog/firebug/automate-page-
load-performance-testing-with-firebug-and-selenium/
DEMO TIME!
Compare page screenshots with history to limit amount of manual work

SCREENSHOT BASED TECHNIQUES
Regression screenshots
              For each
           navigation test



                             Compare

             Take fresh
            screenshots
How can it be stable?

• Disable or mock banners, GIFs and other
  animation
• Limit tested regions for each page
• Improve screenshot comparison algorithms
• Use image comparison tools for manual
  validation
Find panels by corners
                          Check
                         X and Y




                         Validate
                         content
Extract information about page elements for extended layout analysis

SCREENSHOT PROCESSING
TECHNIQUES
Fighting Layout Bugs

• http://code.google.com/p/fighting-layout-
  bugs/
• Open source Java library
• Uses WebDriver
• Proof of concepts
Need to detect edges and text
                 Edges




       Edges              Text
Simple text detector

•   Inject jQuery to the page for simple JavaScript
•   jQuery('*').css('color', '#000000');
•   Take screenshot
•   jQuery('*').css('color', '#FFFFFF');
•   Take screenshot again
•   Compare screenshots – different pixels are
    text
Simple edge detector

• Inject jQuery to the page for simple JavaScript
• jQuery('*').css('color', 'transparent');
• Take screenshot
• Analyze pixel sequences with the same or very
  similar color and contrast pixels from left or
  right
• Apply minimal length constraints
#1. Text overlapping edges

• Bug is where text
  intersects edge
• Replace each buggy
  pixel with circle to
  define buggy areas
• Blend detected areas
  with red line on the
  screenshot
#2. Text with low contrast

• Bug is where text color is close to background
color
• Find areas with the same background color
• Blend detected areas with red line on the
screenshot
#3. Invalid images detection

• Missed, empty or invalid URL
• 4xx or 5xx HTTP response code
• Content-type is not image related
#4. Focus visibility detection

• Switch to the next element with TAB
• Take screenshot
• Check if something changed for element
Other types of layout bugs

• Different layouts in different browsers
• Unintended scrollbars for dialogs and frames
• Broken panel borders
• Text partly hidden
• Broken elements flow
We are capable to do more
with modern technologies
      and our brain
@xpinjection
             http://xpinjection.com
mikalai.alimenkou@xpinjection.com

Contenu connexe

Tendances

Understanding Unit Testing
Understanding Unit TestingUnderstanding Unit Testing
Understanding Unit Testingikhwanhayat
 
End to end test automation with cypress
End to end test automation with cypressEnd to end test automation with cypress
End to end test automation with cypressPankajSingh184960
 
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 ApplitoolsApplitools
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And MockingJoe Wilson
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit TestingJoe Tremblay
 
Software Testing Life Cycle
Software Testing Life CycleSoftware Testing Life Cycle
Software Testing Life Cyclegueste730d5
 
API Test Automation Tips and Tricks
API Test Automation Tips and TricksAPI Test Automation Tips and Tricks
API Test Automation Tips and Trickstesthive
 
Test Driven Development (TDD)
Test Driven Development (TDD)Test Driven Development (TDD)
Test Driven Development (TDD)David Ehringer
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven DevelopmentJohn Blum
 
Performance Testing from Scratch + JMeter intro
Performance Testing from Scratch + JMeter introPerformance Testing from Scratch + JMeter intro
Performance Testing from Scratch + JMeter introMykola Kovsh
 
Jmeter Performance Testing
Jmeter Performance TestingJmeter Performance Testing
Jmeter Performance TestingAtul Pant
 
Unit Testing in Angular
Unit Testing in AngularUnit Testing in Angular
Unit Testing in AngularKnoldus Inc.
 
Introduce Katalon tool
Introduce Katalon toolIntroduce Katalon tool
Introduce Katalon tool재연 김
 

Tendances (20)

Understanding Unit Testing
Understanding Unit TestingUnderstanding Unit Testing
Understanding Unit Testing
 
API Testing
API TestingAPI Testing
API Testing
 
Exploratory test
Exploratory testExploratory test
Exploratory test
 
End to end test automation with cypress
End to end test automation with cypressEnd to end test automation with cypress
End to end test automation with cypress
 
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
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And Mocking
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit Testing
 
GUI Testing
GUI TestingGUI Testing
GUI Testing
 
Software Testing Life Cycle
Software Testing Life CycleSoftware Testing Life Cycle
Software Testing Life Cycle
 
API Test Automation Tips and Tricks
API Test Automation Tips and TricksAPI Test Automation Tips and Tricks
API Test Automation Tips and Tricks
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Angular Unit Testing
Angular Unit TestingAngular Unit Testing
Angular Unit Testing
 
Test Driven Development (TDD)
Test Driven Development (TDD)Test Driven Development (TDD)
Test Driven Development (TDD)
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
 
Performance Testing from Scratch + JMeter intro
Performance Testing from Scratch + JMeter introPerformance Testing from Scratch + JMeter intro
Performance Testing from Scratch + JMeter intro
 
Jmeter Performance Testing
Jmeter Performance TestingJmeter Performance Testing
Jmeter Performance Testing
 
Unit testing with JUnit
Unit testing with JUnitUnit testing with JUnit
Unit testing with JUnit
 
Unit Testing in Angular
Unit Testing in AngularUnit Testing in Angular
Unit Testing in Angular
 
Introduce Katalon tool
Introduce Katalon toolIntroduce Katalon tool
Introduce Katalon tool
 

En vedette

Great functional testing with WebDriver and Thucydides
Great functional testing with WebDriver and ThucydidesGreat functional testing with WebDriver and Thucydides
Great functional testing with WebDriver and ThucydidesMikalai Alimenkou
 
Советы для успешной автоматизации тестирования веб-приложений
Советы для успешной автоматизации тестирования веб-приложенийСоветы для успешной автоматизации тестирования веб-приложений
Советы для успешной автоматизации тестирования веб-приложенийMairbek Khadikov
 
User Interface Тестирование – все ли так просто?
User Interface Тестирование – все ли так просто?User Interface Тестирование – все ли так просто?
User Interface Тестирование – все ли так просто?SQALab
 
Бытовая классификация тестировщиков с точки зрения разработчика
Бытовая классификация тестировщиков с точки зрения разработчикаБытовая классификация тестировщиков с точки зрения разработчика
Бытовая классификация тестировщиков с точки зрения разработчикаMikalai Alimenkou
 
Плюсы и минусы автоматизации, пример из жизни
Плюсы и минусы автоматизации, пример из жизниПлюсы и минусы автоматизации, пример из жизни
Плюсы и минусы автоматизации, пример из жизниz-tech
 
Инструменты для тестирования пользовательского интерфейса UI
Инструменты для тестирования пользовательского интерфейса UIИнструменты для тестирования пользовательского интерфейса UI
Инструменты для тестирования пользовательского интерфейса UIOlesia Velychko
 
Full Scale Automation Using Selenium
Full Scale Automation Using SeleniumFull Scale Automation Using Selenium
Full Scale Automation Using SeleniumAndrii Dzynia
 
Selenide –  лаконичные тесты на Selenium 2 WebDriver + Java bindings
Selenide –  лаконичные тесты на Selenium 2 WebDriver + Java bindingsSelenide –  лаконичные тесты на Selenium 2 WebDriver + Java bindings
Selenide –  лаконичные тесты на Selenium 2 WebDriver + Java bindingsCOMAQA.BY
 
Автотесты на уровне API для Java-приложений
Автотесты на уровне API для Java-приложенийАвтотесты на уровне API для Java-приложений
Автотесты на уровне API для Java-приложенийSQALab
 
QA Fes 2016. Роман Якимчук. Продвинутое тестирование состояний и переходов
QA Fes 2016. Роман Якимчук. Продвинутое тестирование состояний и переходовQA Fes 2016. Роман Якимчук. Продвинутое тестирование состояний и переходов
QA Fes 2016. Роман Якимчук. Продвинутое тестирование состояний и переходовQAFest
 
Будни тестирования Cassandr-ы
Будни тестирования Cassandr-ыБудни тестирования Cassandr-ы
Будни тестирования Cassandr-ыSQALab
 
Automated UI testing done right (DDDSydney)
Automated UI testing done right (DDDSydney)Automated UI testing done right (DDDSydney)
Automated UI testing done right (DDDSydney)Mehdi Khalili
 
Автоматизация тестирования. Разбор конкретного примера - продукта XML2Selenium
Автоматизация тестирования. Разбор конкретного примера - продукта XML2SeleniumАвтоматизация тестирования. Разбор конкретного примера - продукта XML2Selenium
Автоматизация тестирования. Разбор конкретного примера - продукта XML2Seleniumjazzteam
 
Простой взгляд на автоматизацию или Как не изобретать велосипед
Простой взгляд на автоматизацию или Как не изобретать велосипедПростой взгляд на автоматизацию или Как не изобретать велосипед
Простой взгляд на автоматизацию или Как не изобретать велосипедSQALab
 
Инструменты для тестирования UI
Инструменты для тестирования UIИнструменты для тестирования UI
Инструменты для тестирования UIISsoft
 
Мини-школа тестировщиков, ориентированных на Web
Мини-школа тестировщиков, ориентированных на WebМини-школа тестировщиков, ориентированных на Web
Мини-школа тестировщиков, ориентированных на WebSQALab
 
От ручного тестирования к автоматическому: опыт внедрения в крупном проекте
От ручного тестирования к автоматическому: опыт внедрения в крупном проектеОт ручного тестирования к автоматическому: опыт внедрения в крупном проекте
От ручного тестирования к автоматическому: опыт внедрения в крупном проектеSQALab
 
Оптимизация процесса тестирования локализаций
Оптимизация процесса тестирования локализацийОптимизация процесса тестирования локализаций
Оптимизация процесса тестирования локализацийSQALab
 
Как эффективно организовать Автоматизацию, если у вас недостаточно времени, р...
Как эффективно организовать Автоматизацию, если у вас недостаточно времени, р...Как эффективно организовать Автоматизацию, если у вас недостаточно времени, р...
Как эффективно организовать Автоматизацию, если у вас недостаточно времени, р...SQALab
 

En vedette (20)

Great functional testing with WebDriver and Thucydides
Great functional testing with WebDriver and ThucydidesGreat functional testing with WebDriver and Thucydides
Great functional testing with WebDriver and Thucydides
 
Советы для успешной автоматизации тестирования веб-приложений
Советы для успешной автоматизации тестирования веб-приложенийСоветы для успешной автоматизации тестирования веб-приложений
Советы для успешной автоматизации тестирования веб-приложений
 
User Interface Тестирование – все ли так просто?
User Interface Тестирование – все ли так просто?User Interface Тестирование – все ли так просто?
User Interface Тестирование – все ли так просто?
 
Бытовая классификация тестировщиков с точки зрения разработчика
Бытовая классификация тестировщиков с точки зрения разработчикаБытовая классификация тестировщиков с точки зрения разработчика
Бытовая классификация тестировщиков с точки зрения разработчика
 
Why testing take so long
Why testing take so longWhy testing take so long
Why testing take so long
 
Плюсы и минусы автоматизации, пример из жизни
Плюсы и минусы автоматизации, пример из жизниПлюсы и минусы автоматизации, пример из жизни
Плюсы и минусы автоматизации, пример из жизни
 
Инструменты для тестирования пользовательского интерфейса UI
Инструменты для тестирования пользовательского интерфейса UIИнструменты для тестирования пользовательского интерфейса UI
Инструменты для тестирования пользовательского интерфейса UI
 
Full Scale Automation Using Selenium
Full Scale Automation Using SeleniumFull Scale Automation Using Selenium
Full Scale Automation Using Selenium
 
Selenide –  лаконичные тесты на Selenium 2 WebDriver + Java bindings
Selenide –  лаконичные тесты на Selenium 2 WebDriver + Java bindingsSelenide –  лаконичные тесты на Selenium 2 WebDriver + Java bindings
Selenide –  лаконичные тесты на Selenium 2 WebDriver + Java bindings
 
Автотесты на уровне API для Java-приложений
Автотесты на уровне API для Java-приложенийАвтотесты на уровне API для Java-приложений
Автотесты на уровне API для Java-приложений
 
QA Fes 2016. Роман Якимчук. Продвинутое тестирование состояний и переходов
QA Fes 2016. Роман Якимчук. Продвинутое тестирование состояний и переходовQA Fes 2016. Роман Якимчук. Продвинутое тестирование состояний и переходов
QA Fes 2016. Роман Якимчук. Продвинутое тестирование состояний и переходов
 
Будни тестирования Cassandr-ы
Будни тестирования Cassandr-ыБудни тестирования Cassandr-ы
Будни тестирования Cassandr-ы
 
Automated UI testing done right (DDDSydney)
Automated UI testing done right (DDDSydney)Automated UI testing done right (DDDSydney)
Automated UI testing done right (DDDSydney)
 
Автоматизация тестирования. Разбор конкретного примера - продукта XML2Selenium
Автоматизация тестирования. Разбор конкретного примера - продукта XML2SeleniumАвтоматизация тестирования. Разбор конкретного примера - продукта XML2Selenium
Автоматизация тестирования. Разбор конкретного примера - продукта XML2Selenium
 
Простой взгляд на автоматизацию или Как не изобретать велосипед
Простой взгляд на автоматизацию или Как не изобретать велосипедПростой взгляд на автоматизацию или Как не изобретать велосипед
Простой взгляд на автоматизацию или Как не изобретать велосипед
 
Инструменты для тестирования UI
Инструменты для тестирования UIИнструменты для тестирования UI
Инструменты для тестирования UI
 
Мини-школа тестировщиков, ориентированных на Web
Мини-школа тестировщиков, ориентированных на WebМини-школа тестировщиков, ориентированных на Web
Мини-школа тестировщиков, ориентированных на Web
 
От ручного тестирования к автоматическому: опыт внедрения в крупном проекте
От ручного тестирования к автоматическому: опыт внедрения в крупном проектеОт ручного тестирования к автоматическому: опыт внедрения в крупном проекте
От ручного тестирования к автоматическому: опыт внедрения в крупном проекте
 
Оптимизация процесса тестирования локализаций
Оптимизация процесса тестирования локализацийОптимизация процесса тестирования локализаций
Оптимизация процесса тестирования локализаций
 
Как эффективно организовать Автоматизацию, если у вас недостаточно времени, р...
Как эффективно организовать Автоматизацию, если у вас недостаточно времени, р...Как эффективно организовать Автоматизацию, если у вас недостаточно времени, р...
Как эффективно организовать Автоматизацию, если у вас недостаточно времени, р...
 

Similaire à Automated UI Testing

Selenium – Web Browser Automation
Selenium – Web Browser AutomationSelenium – Web Browser Automation
Selenium – Web Browser AutomationPakorn Weecharungsan
 
Untying the Knots of Web Dev with Internet Explorer
Untying the Knots of Web Dev with Internet Explorer Untying the Knots of Web Dev with Internet Explorer
Untying the Knots of Web Dev with Internet Explorer Sarah Dutkiewicz
 
Acceptance Test-driven Development with Cucumber-jvm
Acceptance Test-driven Development with Cucumber-jvmAcceptance Test-driven Development with Cucumber-jvm
Acceptance Test-driven Development with Cucumber-jvmChristopher Bartling
 
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...Sencha
 
Developing JavaScript Widgets
Developing JavaScript WidgetsDeveloping JavaScript Widgets
Developing JavaScript WidgetsBob German
 
A guide to hiring a great developer to build your first app (redacted version)
A guide to hiring a great developer to build your first app (redacted version)A guide to hiring a great developer to build your first app (redacted version)
A guide to hiring a great developer to build your first app (redacted version)Oursky
 
Accessibility Testing - Using Asqatasun - Meetup Webinar
Accessibility Testing - Using Asqatasun - Meetup WebinarAccessibility Testing - Using Asqatasun - Meetup Webinar
Accessibility Testing - Using Asqatasun - Meetup WebinarKeyur Shah
 
Colorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latestColorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latestOnur Baskirt
 
Talk Paris Infovis 091207132953 Phpapp01(2)
Talk Paris Infovis 091207132953 Phpapp01(2)Talk Paris Infovis 091207132953 Phpapp01(2)
Talk Paris Infovis 091207132953 Phpapp01(2)johnnybiz
 
Using Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the WebUsing Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the Webphilogb
 
[2015/2016] HTML5 and CSS3 Refresher
[2015/2016] HTML5 and CSS3 Refresher[2015/2016] HTML5 and CSS3 Refresher
[2015/2016] HTML5 and CSS3 RefresherIvano Malavolta
 
JavaScript in Universal Windows Platform apps
JavaScript in Universal Windows Platform appsJavaScript in Universal Windows Platform apps
JavaScript in Universal Windows Platform appsTimmy Kokke
 
Web Automation Testing for developers?
Web Automation Testing for developers?Web Automation Testing for developers?
Web Automation Testing for developers?Victor Kushchenko
 

Similaire à Automated UI Testing (20)

Sai Sharan_UI_Resume
Sai Sharan_UI_ResumeSai Sharan_UI_Resume
Sai Sharan_UI_Resume
 
Santosh_Resume_Java
Santosh_Resume_JavaSantosh_Resume_Java
Santosh_Resume_Java
 
Selenium – Web Browser Automation
Selenium – Web Browser AutomationSelenium – Web Browser Automation
Selenium – Web Browser Automation
 
Untying the Knots of Web Dev with Internet Explorer
Untying the Knots of Web Dev with Internet Explorer Untying the Knots of Web Dev with Internet Explorer
Untying the Knots of Web Dev with Internet Explorer
 
Acceptance Test-driven Development with Cucumber-jvm
Acceptance Test-driven Development with Cucumber-jvmAcceptance Test-driven Development with Cucumber-jvm
Acceptance Test-driven Development with Cucumber-jvm
 
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
SenchaCon 2016: The Changing Landscape of JavaScript Testing - Joel Watson an...
 
Developing JavaScript Widgets
Developing JavaScript WidgetsDeveloping JavaScript Widgets
Developing JavaScript Widgets
 
Prashant_Shukla-UI
Prashant_Shukla-UIPrashant_Shukla-UI
Prashant_Shukla-UI
 
A guide to hiring a great developer to build your first app (redacted version)
A guide to hiring a great developer to build your first app (redacted version)A guide to hiring a great developer to build your first app (redacted version)
A guide to hiring a great developer to build your first app (redacted version)
 
Accessibility Testing - Using Asqatasun - Meetup Webinar
Accessibility Testing - Using Asqatasun - Meetup WebinarAccessibility Testing - Using Asqatasun - Meetup Webinar
Accessibility Testing - Using Asqatasun - Meetup Webinar
 
Colorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latestColorful world-of-visual-automation-testing-latest
Colorful world-of-visual-automation-testing-latest
 
Talk Paris Infovis 091207132953 Phpapp01(2)
Talk Paris Infovis 091207132953 Phpapp01(2)Talk Paris Infovis 091207132953 Phpapp01(2)
Talk Paris Infovis 091207132953 Phpapp01(2)
 
Using Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the WebUsing Web Standards to create Interactive Data Visualizations for the Web
Using Web Standards to create Interactive Data Visualizations for the Web
 
[2015/2016] HTML5 and CSS3 Refresher
[2015/2016] HTML5 and CSS3 Refresher[2015/2016] HTML5 and CSS3 Refresher
[2015/2016] HTML5 and CSS3 Refresher
 
orcreatehappyusers
orcreatehappyusersorcreatehappyusers
orcreatehappyusers
 
orcreatehappyusers
orcreatehappyusersorcreatehappyusers
orcreatehappyusers
 
Building SPA’s (Single Page App) with Backbone.js
Building SPA’s (Single Page App) with Backbone.jsBuilding SPA’s (Single Page App) with Backbone.js
Building SPA’s (Single Page App) with Backbone.js
 
JavaScript in Universal Windows Platform apps
JavaScript in Universal Windows Platform appsJavaScript in Universal Windows Platform apps
JavaScript in Universal Windows Platform apps
 
Web Automation Testing for developers?
Web Automation Testing for developers?Web Automation Testing for developers?
Web Automation Testing for developers?
 
KATHY ZHANG_3
KATHY ZHANG_3KATHY ZHANG_3
KATHY ZHANG_3
 

Plus de Mikalai Alimenkou

Rise and fall of Story Points. Capacity based planning from the trenches.
Rise and fall of Story Points. Capacity based planning from the trenches.Rise and fall of Story Points. Capacity based planning from the trenches.
Rise and fall of Story Points. Capacity based planning from the trenches.Mikalai Alimenkou
 
Static analysis tools as the best friend of QA
Static analysis tools as the best friend of QAStatic analysis tools as the best friend of QA
Static analysis tools as the best friend of QAMikalai Alimenkou
 
Modern CI/CD in the microservices world with Kubernetes
Modern CI/CD in the microservices world with KubernetesModern CI/CD in the microservices world with Kubernetes
Modern CI/CD in the microservices world with KubernetesMikalai Alimenkou
 
Saga about distributed business transactions in microservices world
Saga about distributed business transactions in microservices worldSaga about distributed business transactions in microservices world
Saga about distributed business transactions in microservices worldMikalai Alimenkou
 
Effectiveness tips from Kubernetes trenches by Captain Obvious
Effectiveness tips from Kubernetes trenches by Captain ObviousEffectiveness tips from Kubernetes trenches by Captain Obvious
Effectiveness tips from Kubernetes trenches by Captain ObviousMikalai Alimenkou
 
Ride the database in JUnit tests with Database Rider
Ride the database in JUnit tests with Database RiderRide the database in JUnit tests with Database Rider
Ride the database in JUnit tests with Database RiderMikalai Alimenkou
 
Wastful waste or why everything is so slow in development
Wastful waste or why everything is so slow in developmentWastful waste or why everything is so slow in development
Wastful waste or why everything is so slow in developmentMikalai Alimenkou
 
Hexagonal architecture with Spring Boot
Hexagonal architecture with Spring BootHexagonal architecture with Spring Boot
Hexagonal architecture with Spring BootMikalai Alimenkou
 
Wastful waste or why everything is so slow in development
Wastful waste or why everything is so slow in developmentWastful waste or why everything is so slow in development
Wastful waste or why everything is so slow in developmentMikalai Alimenkou
 
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 ...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 ...Mikalai Alimenkou
 
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 landscapeDevOps checklist or how to understand where is your team in DevOps landscape
DevOps checklist or how to understand where is your team in DevOps landscapeMikalai Alimenkou
 
Практические трудности в разработке Медкарты для целой страны
Практические трудности в разработке Медкарты для целой страныПрактические трудности в разработке Медкарты для целой страны
Практические трудности в разработке Медкарты для целой страныMikalai Alimenkou
 
Hexagonal architecture with Spring Boot [EPAM Java online conference]
Hexagonal architecture with Spring Boot [EPAM Java online conference]Hexagonal architecture with Spring Boot [EPAM Java online conference]
Hexagonal architecture with Spring Boot [EPAM Java online conference]Mikalai Alimenkou
 
Bro, manage test data like a pro! [QA Fest 2018]
Bro, manage test data like a pro! [QA Fest 2018]Bro, manage test data like a pro! [QA Fest 2018]
Bro, manage test data like a pro! [QA Fest 2018]Mikalai Alimenkou
 
Agile antipatterns: review after 10 years of practice
Agile antipatterns: review after 10 years of practiceAgile antipatterns: review after 10 years of practice
Agile antipatterns: review after 10 years of practiceMikalai Alimenkou
 
Hexagonal architecture with Spring Boot
Hexagonal architecture with Spring BootHexagonal architecture with Spring Boot
Hexagonal architecture with Spring BootMikalai Alimenkou
 
Bro, manage test data like a pro!
Bro, manage test data like a pro!Bro, manage test data like a pro!
Bro, manage test data like a pro!Mikalai Alimenkou
 
Бытовая классификация тестировщиков с точки зрения разработчика
Бытовая классификация тестировщиков с точки зрения разработчикаБытовая классификация тестировщиков с точки зрения разработчика
Бытовая классификация тестировщиков с точки зрения разработчикаMikalai Alimenkou
 
Code Review tool for personal effectiveness and waste analysis
Code Review tool for personal effectiveness and waste analysisCode Review tool for personal effectiveness and waste analysis
Code Review tool for personal effectiveness and waste analysisMikalai Alimenkou
 
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 landscapeMikalai Alimenkou
 

Plus de Mikalai Alimenkou (20)

Rise and fall of Story Points. Capacity based planning from the trenches.
Rise and fall of Story Points. Capacity based planning from the trenches.Rise and fall of Story Points. Capacity based planning from the trenches.
Rise and fall of Story Points. Capacity based planning from the trenches.
 
Static analysis tools as the best friend of QA
Static analysis tools as the best friend of QAStatic analysis tools as the best friend of QA
Static analysis tools as the best friend of QA
 
Modern CI/CD in the microservices world with Kubernetes
Modern CI/CD in the microservices world with KubernetesModern CI/CD in the microservices world with Kubernetes
Modern CI/CD in the microservices world with Kubernetes
 
Saga about distributed business transactions in microservices world
Saga about distributed business transactions in microservices worldSaga about distributed business transactions in microservices world
Saga about distributed business transactions in microservices world
 
Effectiveness tips from Kubernetes trenches by Captain Obvious
Effectiveness tips from Kubernetes trenches by Captain ObviousEffectiveness tips from Kubernetes trenches by Captain Obvious
Effectiveness tips from Kubernetes trenches by Captain Obvious
 
Ride the database in JUnit tests with Database Rider
Ride the database in JUnit tests with Database RiderRide the database in JUnit tests with Database Rider
Ride the database in JUnit tests with Database Rider
 
Wastful waste or why everything is so slow in development
Wastful waste or why everything is so slow in developmentWastful waste or why everything is so slow in development
Wastful waste or why everything is so slow in development
 
Hexagonal architecture with Spring Boot
Hexagonal architecture with Spring BootHexagonal architecture with Spring Boot
Hexagonal architecture with Spring Boot
 
Wastful waste or why everything is so slow in development
Wastful waste or why everything is so slow in developmentWastful waste or why everything is so slow in development
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 ...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 ...
 
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 landscapeDevOps 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]
Hexagonal architecture with Spring Boot [EPAM Java online conference]Hexagonal architecture with Spring Boot [EPAM Java online conference]
Hexagonal architecture with Spring Boot [EPAM Java online conference]
 
Bro, manage test data like a pro! [QA Fest 2018]
Bro, manage test data like a pro! [QA Fest 2018]Bro, manage test data like a pro! [QA Fest 2018]
Bro, manage test data like a pro! [QA Fest 2018]
 
Agile antipatterns: review after 10 years of practice
Agile antipatterns: review after 10 years of practiceAgile antipatterns: review after 10 years of practice
Agile antipatterns: review after 10 years of practice
 
Hexagonal architecture with Spring Boot
Hexagonal architecture with Spring BootHexagonal architecture with Spring Boot
Hexagonal architecture with Spring Boot
 
Bro, manage test data like a pro!
Bro, manage test data like a pro!Bro, manage test data like a pro!
Bro, manage test data like a pro!
 
Бытовая классификация тестировщиков с точки зрения разработчика
Бытовая классификация тестировщиков с точки зрения разработчикаБытовая классификация тестировщиков с точки зрения разработчика
Бытовая классификация тестировщиков с точки зрения разработчика
 
Code Review tool for personal effectiveness and waste analysis
Code Review tool for personal effectiveness and waste analysisCode Review tool for personal effectiveness and waste analysis
Code Review tool for personal effectiveness and waste analysis
 
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
 

Dernier

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxfnnc6jmgwh
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 

Dernier (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptxGenerative AI - Gitex v1Generative AI - Gitex v1.pptx
Generative AI - Gitex v1Generative AI - Gitex v1.pptx
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 

Automated UI Testing

  • 1. Automated Web UI Testing Mikalai Alimenkou http://xpinjection.com @xpinjection
  • 2.
  • 3. Do you need UI testing?
  • 4. Ugly design = bad user experience
  • 5. Some sites can lose money
  • 6. Think about design as non-functional requirement
  • 7. May be just do it manually? Large number Many of pages browsers
  • 8. Not all layout bugs are so visible
  • 9. Navigation through all pages is very useful for all types of testing NAVIGATION TESTS WITH WEBDRIVER
  • 10. Why WebDriver? • Works with many browsers • Can handle window size and browser settings • Clear and simple API • Allow to execute JavaScript
  • 11. How do navigation tests work? Preconfigured Define all environment pages from requirements Reference Wait for database Load in series READY state
  • 12. Types of UI testing Image analysis Screenshot based Static (HTML, CSS, JavaScript)
  • 13. Well structured page has better chances to be displayed correctly STATIC ANALYSIS TECHNIQUES
  • 14.
  • 15.
  • 16. How to access page? • Filter in Java for static HTML • Lightweight proxy server • HtmlWebDriver • Real browsers to make things realistic: • work with user agents • browser specific headers • dynamic pages
  • 17. Existing solutions for Java • http://www.rexsl.com/rexsl-w3c/ - API for W3C validators • https://code.google.com/p/w3c-markup- validation-filter/ - validation Filter
  • 19.
  • 20.
  • 22. Useful techniques • Disable everything you don’t want to validate • Disable ads, banners, images to make everything quicker • Static CSS may be validated on server
  • 23. HTTP proxy for statistics https://github.com/webmetrics/browsermob-proxy
  • 24. What can you get from HTTP proxy? • External resources integration status (Facebook, Twitter, Ads, etc.) • Images, banners, ads and other nonfunctional resources • Collect HTTP traffic for analysis (404, redirects, loading time, etc.)
  • 25. Net panel in Firebug
  • 26. Export statistics and reports http://www.softwareishard.com/blog/firebug/automate-page- load-performance-testing-with-firebug-and-selenium/
  • 28. Compare page screenshots with history to limit amount of manual work SCREENSHOT BASED TECHNIQUES
  • 29. Regression screenshots For each navigation test Compare Take fresh screenshots
  • 30. How can it be stable? • Disable or mock banners, GIFs and other animation • Limit tested regions for each page • Improve screenshot comparison algorithms • Use image comparison tools for manual validation
  • 31. Find panels by corners Check X and Y Validate content
  • 32. Extract information about page elements for extended layout analysis SCREENSHOT PROCESSING TECHNIQUES
  • 33. Fighting Layout Bugs • http://code.google.com/p/fighting-layout- bugs/ • Open source Java library • Uses WebDriver • Proof of concepts
  • 34. Need to detect edges and text Edges Edges Text
  • 35. Simple text detector • Inject jQuery to the page for simple JavaScript • jQuery('*').css('color', '#000000'); • Take screenshot • jQuery('*').css('color', '#FFFFFF'); • Take screenshot again • Compare screenshots – different pixels are text
  • 36. Simple edge detector • Inject jQuery to the page for simple JavaScript • jQuery('*').css('color', 'transparent'); • Take screenshot • Analyze pixel sequences with the same or very similar color and contrast pixels from left or right • Apply minimal length constraints
  • 37. #1. Text overlapping edges • Bug is where text intersects edge • Replace each buggy pixel with circle to define buggy areas • Blend detected areas with red line on the screenshot
  • 38. #2. Text with low contrast • Bug is where text color is close to background color • Find areas with the same background color • Blend detected areas with red line on the screenshot
  • 39. #3. Invalid images detection • Missed, empty or invalid URL • 4xx or 5xx HTTP response code • Content-type is not image related
  • 40. #4. Focus visibility detection • Switch to the next element with TAB • Take screenshot • Check if something changed for element
  • 41. Other types of layout bugs • Different layouts in different browsers • Unintended scrollbars for dialogs and frames • Broken panel borders • Text partly hidden • Broken elements flow
  • 42. We are capable to do more with modern technologies and our brain
  • 43. @xpinjection http://xpinjection.com mikalai.alimenkou@xpinjection.com