SlideShare a Scribd company logo
UI Testing Automation
DO BUGS HURT?




                CreamTec   2
WHERE TO TEST?




                 CreamTec   3
TEST UI IN A REAL BROWSER

 •   Execute JavaScript and see ALL errors
 •   Load all resources (images, CSS)
 •   Test layouts and CSS properties
 •   Check colors and fonts
 •   Verify quirks of each browser type and version
 •   Is the ONLY way to be sure UI looks and works right




                                        CreamTec           4
UI TESTING TOOLS


Frameworks                                 Test Case Example
                                           public class Example {
•   Selenium browser automation
    through WebDriver API                      public static void main(String[] args) {
                                                 // Create a new instance of the html unit driver
                                                 WebDriver driver = new HtmlUnitDriver();
•   QUnit unit testing JavaScript                  // And now use this to visit Google
    inside and outside the browser                 driver.get("http://www.google.com");
                                                   // Find the text input element by its name
•   CasperJS unit testing JavaScript               WebElement element = driver.findElement(By.name("q"));

    inside a headless browser                      // Enter something to search for
                                                   element.sendKeys("Cheese!");

•   GWTTestCase uses invisible                     // Now submit the form
                                                   element.submit();
    browser to run Java tests                      // Verify result
                                                   assertTrue(selenium.isTextPresent(“Welcome"));

                                               }
                                           }




                                       CreamTec                                                             5
UI TESTING TOOLS


Products                                     Test Case Example
•   QuickTestPro feature rich IDE for        SystemUtil.Run "IEXPLORE.EXE","www. perfumes.com"
    functional and regression testing        Wait 5
•   Rational Test Workbench                  Set myBrowser=Browser("Perfumes-Discount perfume")
    functional, load and regression          If myBrowser.Page("Perfumes-Discount
    testing from IBM                         perfume").Link("Login").Exist(3) Then
                                               Reporter.ReportEvent 0,"Res","Login Link Exists"
•   SilkTest suite of testing products
    targeting simplicity                     Else
                                               Reporter.ReportEvent 1,"Res","Login Link Not Exists"
                                             End If




                                         CreamTec                                                     6
HOW ABOUT THE REAL WORLD?




                   CreamTec   7
TESTING IN REAL WORLD




                    CreamTec   8
UI AUTOMATION CHALLENGES


•   Requires development skills (HTML/CSS/JavaScript/XPath)
•   Requires knowledge of UI internals (id, structure, validation)
•   Test creation takes too long
•   Tests duplicate app logic
•   Tests get out of sync and maintenance is tedious
•   Takes too long to deal with UI changes
•   Tests development delays releases
•   Tools are not productive and too complex




                                          CreamTec                   9
VISUAL TESTING


•   10x productivity gain compared to traditional testing
•   Automation of how you already test instead of learning how to use a tool
•   Empower non-technical people to build and maintain tests
•   Full access to Selenium API when needed
•   Web based shared environment




                                          CreamTec                             10
GMAIL TEST AUTOMATION




                   CreamTec   11
VISUAL TESTING




                 CreamTec   12
GMAIL TEST AUTOMATION




                   CreamTec   13
WHAT CHANGED?




                CreamTec   14
GMAIL TEST AUTOMATION




                   CreamTec   15
GMAIL TEST AUTOMATION




                   CreamTec   16
VISUAL DIFF




              CreamTec   17
CONCLUSIONS

•   Don’t fall into manual testing trap
•   Test business logic with API and unit
    tests in native language (JUnit etc)
•   Test complex JavaScript logic with
    JavaScript unit tests (QUnit/CasperJS)
•   Cover production UI with visual tests
    (Screenster)




                                            CreamTec   18

More Related Content

PDF
UI Testing Automation
PPTX
Automated Testing using JavaScript
PPTX
Automated UI testing done right (DDDSydney)
PPTX
Automation using Javascript
PPTX
Automated Smoke Tests with Protractor
PPTX
Browser Automated Testing Frameworks - Nightwatch.js
PDF
Join the darkside: Selenium testing with Nightwatch.js
PDF
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
UI Testing Automation
Automated Testing using JavaScript
Automated UI testing done right (DDDSydney)
Automation using Javascript
Automated Smoke Tests with Protractor
Browser Automated Testing Frameworks - Nightwatch.js
Join the darkside: Selenium testing with Nightwatch.js
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015

What's hot (20)

PPTX
Marcin Wasilczyk - Page objects with selenium
PPTX
Protractor Tutorial Quality in Agile 2015
PPTX
Using protractor to build automated ui tests
PDF
Automated Web Testing using JavaScript
PPTX
Automate testing with behat, selenium, phantom js and nightwatch.js (5)
KEY
Jellyfish, JSCONF 2011
PPTX
Test-Driven JavaScript Development (JavaZone 2010)
PPTX
TGT#13 - UI Tests Automation Framework in Evolve EDM – Case Study - Mateusz R...
PDF
Front-End Testing: Demystified
PDF
Web UI test automation instruments
PPTX
Protractor overview
PPTX
Angular UI Testing with Protractor
PDF
Building testable chrome extensions
PDF
Testing nightwatch, by David Torroija
PPTX
Protractor Testing Automation Tool Framework / Jasmine Reporters
PDF
Real World Selenium Testing
PDF
UI Testing Best Practices - An Expected Journey
PDF
AngularJS and Protractor
PDF
Efficient JavaScript Unit Testing, May 2012
PPTX
An Introduction to AngularJS End to End Testing using Protractor
Marcin Wasilczyk - Page objects with selenium
Protractor Tutorial Quality in Agile 2015
Using protractor to build automated ui tests
Automated Web Testing using JavaScript
Automate testing with behat, selenium, phantom js and nightwatch.js (5)
Jellyfish, JSCONF 2011
Test-Driven JavaScript Development (JavaZone 2010)
TGT#13 - UI Tests Automation Framework in Evolve EDM – Case Study - Mateusz R...
Front-End Testing: Demystified
Web UI test automation instruments
Protractor overview
Angular UI Testing with Protractor
Building testable chrome extensions
Testing nightwatch, by David Torroija
Protractor Testing Automation Tool Framework / Jasmine Reporters
Real World Selenium Testing
UI Testing Best Practices - An Expected Journey
AngularJS and Protractor
Efficient JavaScript Unit Testing, May 2012
An Introduction to AngularJS End to End Testing using Protractor
Ad

Similar to UI Testing Automation - Alex Kalinovsky - CreamTec LLC (20)

PPT
Enterprise Ready Test Execution Platform for Mobile Apps
PPTX
Advanced Coded UI Testing
PDF
Salesforce selenium-saucelabs-webinar-april-2014
PDF
Selenium at Salesforce Scale
PPTX
Selenium withnet
PDF
selenium meetup sf talk march 2014 Selenium at Scale
PDF
UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)
PDF
Good practices for debugging Selenium and Appium tests
PDF
Selenium Basics Tutorial
PPTX
Testing Ext JS and Sencha Touch
ODP
Integrating Selenium testing infrastructure into Scala Project
PPTX
QASymphony Atlanta Customer User Group Fall 2017
PPTX
Joomla! Testing - J!DD Germany 2016
ODP
AD208 - End to End Quality Processes for Top Notch XPages Apps
PPTX
Test automation introduction training at Polteq
PDF
UI-Testing - Selenium? Rich-Clients? Containers? @APEX connect 2018
DOC
Qtp complete guide for all
DOC
Qtp basics
PPTX
SPA 2009 - Acceptance Testing AJAX Web Applications through the GUI
PPTX
Test automation lesson
Enterprise Ready Test Execution Platform for Mobile Apps
Advanced Coded UI Testing
Salesforce selenium-saucelabs-webinar-april-2014
Selenium at Salesforce Scale
Selenium withnet
selenium meetup sf talk march 2014 Selenium at Scale
UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)
Good practices for debugging Selenium and Appium tests
Selenium Basics Tutorial
Testing Ext JS and Sencha Touch
Integrating Selenium testing infrastructure into Scala Project
QASymphony Atlanta Customer User Group Fall 2017
Joomla! Testing - J!DD Germany 2016
AD208 - End to End Quality Processes for Top Notch XPages Apps
Test automation introduction training at Polteq
UI-Testing - Selenium? Rich-Clients? Containers? @APEX connect 2018
Qtp complete guide for all
Qtp basics
SPA 2009 - Acceptance Testing AJAX Web Applications through the GUI
Test automation lesson
Ad

More from Jim Lane (9)

PDF
ADPList BeMore'24 Unlock Your Team's Potential with Coaching
PDF
Design Systems, Beyond Components: Spacing, Measurement & More
PDF
Bootstrapping UX
PDF
ux@addthis NoVA UX meetup presentation
PDF
Notion Theory: UX Lessons Learned
PDF
NoVA UX User Testing Workshop July 2015 - Will King
PPTX
Chrissy Ching: How to Land a Job in UX
PDF
NoVA UX Meetup: Product Testing and Data-informed Design
PPTX
AddThis Web Intents Lightning Talk
ADPList BeMore'24 Unlock Your Team's Potential with Coaching
Design Systems, Beyond Components: Spacing, Measurement & More
Bootstrapping UX
ux@addthis NoVA UX meetup presentation
Notion Theory: UX Lessons Learned
NoVA UX User Testing Workshop July 2015 - Will King
Chrissy Ching: How to Land a Job in UX
NoVA UX Meetup: Product Testing and Data-informed Design
AddThis Web Intents Lightning Talk

Recently uploaded (20)

PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Big Data Technologies - Introduction.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Electronic commerce courselecture one. Pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Empathic Computing: Creating Shared Understanding
PPTX
Cloud computing and distributed systems.
PDF
Encapsulation theory and applications.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPT
Teaching material agriculture food technology
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Machine learning based COVID-19 study performance prediction
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Spectral efficient network and resource selection model in 5G networks
Digital-Transformation-Roadmap-for-Companies.pptx
Big Data Technologies - Introduction.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Electronic commerce courselecture one. Pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Empathic Computing: Creating Shared Understanding
Cloud computing and distributed systems.
Encapsulation theory and applications.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Teaching material agriculture food technology
Per capita expenditure prediction using model stacking based on satellite ima...
Machine learning based COVID-19 study performance prediction
Mobile App Security Testing_ A Comprehensive Guide.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
NewMind AI Weekly Chronicles - August'25 Week I

UI Testing Automation - Alex Kalinovsky - CreamTec LLC

  • 2. DO BUGS HURT? CreamTec 2
  • 3. WHERE TO TEST? CreamTec 3
  • 4. TEST UI IN A REAL BROWSER • Execute JavaScript and see ALL errors • Load all resources (images, CSS) • Test layouts and CSS properties • Check colors and fonts • Verify quirks of each browser type and version • Is the ONLY way to be sure UI looks and works right CreamTec 4
  • 5. UI TESTING TOOLS Frameworks Test Case Example public class Example { • Selenium browser automation through WebDriver API public static void main(String[] args) { // Create a new instance of the html unit driver WebDriver driver = new HtmlUnitDriver(); • QUnit unit testing JavaScript // And now use this to visit Google inside and outside the browser driver.get("http://www.google.com"); // Find the text input element by its name • CasperJS unit testing JavaScript WebElement element = driver.findElement(By.name("q")); inside a headless browser // Enter something to search for element.sendKeys("Cheese!"); • GWTTestCase uses invisible // Now submit the form element.submit(); browser to run Java tests // Verify result assertTrue(selenium.isTextPresent(“Welcome")); } } CreamTec 5
  • 6. UI TESTING TOOLS Products Test Case Example • QuickTestPro feature rich IDE for SystemUtil.Run "IEXPLORE.EXE","www. perfumes.com" functional and regression testing Wait 5 • Rational Test Workbench Set myBrowser=Browser("Perfumes-Discount perfume") functional, load and regression If myBrowser.Page("Perfumes-Discount testing from IBM perfume").Link("Login").Exist(3) Then Reporter.ReportEvent 0,"Res","Login Link Exists" • SilkTest suite of testing products targeting simplicity Else Reporter.ReportEvent 1,"Res","Login Link Not Exists" End If CreamTec 6
  • 7. HOW ABOUT THE REAL WORLD? CreamTec 7
  • 8. TESTING IN REAL WORLD CreamTec 8
  • 9. UI AUTOMATION CHALLENGES • Requires development skills (HTML/CSS/JavaScript/XPath) • Requires knowledge of UI internals (id, structure, validation) • Test creation takes too long • Tests duplicate app logic • Tests get out of sync and maintenance is tedious • Takes too long to deal with UI changes • Tests development delays releases • Tools are not productive and too complex CreamTec 9
  • 10. VISUAL TESTING • 10x productivity gain compared to traditional testing • Automation of how you already test instead of learning how to use a tool • Empower non-technical people to build and maintain tests • Full access to Selenium API when needed • Web based shared environment CreamTec 10
  • 11. GMAIL TEST AUTOMATION CreamTec 11
  • 12. VISUAL TESTING CreamTec 12
  • 13. GMAIL TEST AUTOMATION CreamTec 13
  • 14. WHAT CHANGED? CreamTec 14
  • 15. GMAIL TEST AUTOMATION CreamTec 15
  • 16. GMAIL TEST AUTOMATION CreamTec 16
  • 17. VISUAL DIFF CreamTec 17
  • 18. CONCLUSIONS • Don’t fall into manual testing trap • Test business logic with API and unit tests in native language (JUnit etc) • Test complex JavaScript logic with JavaScript unit tests (QUnit/CasperJS) • Cover production UI with visual tests (Screenster) CreamTec 18