SlideShare une entreprise Scribd logo
1  sur  18
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

Contenu connexe

Tendances

Tendances (20)

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

Similaire à UI Testing Automation - Alex Kalinovsky - CreamTec LLC

Selenium withnet
Selenium withnetSelenium withnet
Selenium withnet
Vlad Maniak
 
UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)
UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)
UI Testing - Selenium? Rich-Clients? Containers? (SwanseaCon 2018)
Tobias Schneck
 
UI-Testing - Selenium? Rich-Clients? Containers? @APEX connect 2018
UI-Testing - Selenium? Rich-Clients? Containers? @APEX connect 2018UI-Testing - Selenium? Rich-Clients? Containers? @APEX connect 2018
UI-Testing - Selenium? Rich-Clients? Containers? @APEX connect 2018
Tobias Schneck
 
Qtp complete guide for all
Qtp complete guide for allQtp complete guide for all
Qtp complete guide for all
Ramu Palanki
 

Similaire à UI Testing Automation - Alex Kalinovsky - CreamTec LLC (20)

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

Plus de Jim Lane

Plus de Jim Lane (8)

Design Systems, Beyond Components: Spacing, Measurement & More
Design Systems, Beyond Components: Spacing, Measurement & MoreDesign Systems, Beyond Components: Spacing, Measurement & More
Design Systems, Beyond Components: Spacing, Measurement & More
 
Bootstrapping UX
Bootstrapping UXBootstrapping UX
Bootstrapping UX
 
ux@addthis NoVA UX meetup presentation
ux@addthis NoVA UX meetup presentationux@addthis NoVA UX meetup presentation
ux@addthis NoVA UX meetup presentation
 
Notion Theory: UX Lessons Learned
Notion Theory: UX Lessons LearnedNotion Theory: UX Lessons Learned
Notion Theory: UX Lessons Learned
 
NoVA UX User Testing Workshop July 2015 - Will King
NoVA UX User Testing Workshop July 2015 - Will KingNoVA UX User Testing Workshop July 2015 - Will King
NoVA UX User Testing Workshop July 2015 - Will King
 
Chrissy Ching: How to Land a Job in UX
Chrissy Ching: How to Land a Job in UXChrissy Ching: How to Land a Job in UX
Chrissy Ching: How to Land a Job in UX
 
NoVA UX Meetup: Product Testing and Data-informed Design
NoVA UX Meetup: Product Testing and Data-informed DesignNoVA UX Meetup: Product Testing and Data-informed Design
NoVA UX Meetup: Product Testing and Data-informed Design
 
AddThis Web Intents Lightning Talk
AddThis Web Intents Lightning TalkAddThis Web Intents Lightning Talk
AddThis Web Intents Lightning Talk
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 

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