SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Downloaden Sie, um offline zu lesen
WebDriver Tests for
                         ExtJS Applications
                              Andrii Dzynia




Saturday, March 2, 13
 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Andrii	
  Dzynia




Saturday, March 2, 13
 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Andrii	
  Dzynia

                                  Test	
  Engineer/Consultant/Trainer




Saturday, March 2, 13
 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Andrii	
  Dzynia

                                  Test	
  Engineer/Consultant/Trainer




Saturday, March 2, 13
 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Andrii	
  Dzynia

                                  Test	
  Engineer/Consultant/Trainer




Saturday, March 2, 13
 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Andrii	
  Dzynia

                                  Test	
  Engineer/Consultant/Trainer




Saturday, March 2, 13
 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Andrii	
  Dzynia

                                             Test	
  Engineer/Consultant/Trainer



                        @adzynia




Saturday, March 2, 13
 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Andrii	
  Dzynia

                                              Test	
  Engineer/Consultant/Trainer



                         @adzynia




                        h8p://adzynia.com

Saturday, March 2, 13
 	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Andrii	
  Dzynia

                                              Test	
  Engineer/Consultant/Trainer



                         @adzynia




                        h8p://adzynia.com

Saturday, March 2, 13
Technical Context

                        • Java Enterprise Application
                        • ExtJS on UI level
                        • WebDriver for Test Automation


Saturday, March 2, 13
What is ExtJS?

                  Ext JS is a pure JavaScript application framework
                  for building interactive web applications
                  using techniques such as
                  Ajax, DHTML and DOM scripting.




Saturday, March 2, 13
Demo




                        http://docs.sencha.com/ext-js/4-1/extjs-build/examples/
Saturday, March 2, 13
First Stage



                            As Usual


Saturday, March 2, 13
Locators
                        • css = button[id *= ‘add_user_action’]
                        • css = .x-panel.x-grid-with-row-lines
                        • name = title

                        • xpath = "//*[@class='x-column-header-text'
                          and text()='Due Date']"


Saturday, March 2, 13
Builders




Saturday, March 2, 13
WaitForExtJs




Saturday, March 2, 13
Custom Waiters




Saturday, March 2, 13
Exceptions




Saturday, March 2, 13
Actions




Saturday, March 2, 13
Results

                        Traditional approach   Code can be too complex




                        Help in simple cases   No reusable components




Saturday, March 2, 13
Who was solving this
                              before?
                        • https://github.com/mariominati/test-www-
                          selenium-extjs/tree/master/Test-WWW-
                          Selenium-ExtJS
                        • https://github.com/asaflevy/SelenuimExtend/ 
                        • https://github.com/cathoderay/selenium-
                          extjs
                        • http://code.google.com/p/extenium/
Saturday, March 2, 13
Second Stage



                        ExtJSElementObjects


Saturday, March 2, 13
ExtJSComboBox




Saturday, March 2, 13
ExtJSComboBox




Saturday, March 2, 13
ExtJSMessageBox




Saturday, March 2, 13
ExtJSGridTable




Saturday, March 2, 13
ExtJSGridTable




Saturday, March 2, 13
Results

                        Reusable components   WebDriver is so slow




                          Can be extended       IE is critical slow!




Saturday, March 2, 13
Stage 3


                        JavaScript Injections



Saturday, March 2, 13
ExtJS API
                 Ext.get('id').dom.value
                 Ext.ComponentQuery.query('panel[cls=myCls]');
                 Ext.select(selector)
                 Ext.core.Element.select(selector, unique, root)
                 Ext.getDom(el)



Saturday, March 2, 13
Demo




Saturday, March 2, 13
JS Injection




Saturday, March 2, 13
Results


                                     Not real-user
                        Faster!
                                       actions



Saturday, March 2, 13
Lessons Learned

                        • Think how you will be testing at first
                        • Work side-by-side with front-end
                          developers
                        • Delegate ExtJS magic for your Elements API


Saturday, March 2, 13
@a
                                                    dz
     me                                               yn
                 @a                                         ia
                   dz
                     yn
                          ia.c
                                 om

                                      ad
                                         zy
                                            n   ia.
                                                   co
                                                        m
Saturday, March 2, 13

Weitere ähnliche Inhalte

Andere mochten auch

Carrasco antonio casa
Carrasco antonio casaCarrasco antonio casa
Carrasco antonio casa
mdanavarra
 
Customer service behaviors 11 2012
Customer service behaviors 11 2012Customer service behaviors 11 2012
Customer service behaviors 11 2012
Lynne Reed
 

Andere mochten auch (14)

here is the Shift
here is the Shifthere is the Shift
here is the Shift
 
SORACOM UG Miyagi #1 | IoT通信プラットフォーム SORACOM のご紹介と最新情報
SORACOM UG Miyagi #1 | IoT通信プラットフォーム SORACOM のご紹介と最新情報SORACOM UG Miyagi #1 | IoT通信プラットフォーム SORACOM のご紹介と最新情報
SORACOM UG Miyagi #1 | IoT通信プラットフォーム SORACOM のご紹介と最新情報
 
Carrasco antonio casa
Carrasco antonio casaCarrasco antonio casa
Carrasco antonio casa
 
Selenium
SeleniumSelenium
Selenium
 
Dr Janelle Chiasera discusses Developing an Institutional Equity Plan
Dr Janelle Chiasera discusses Developing an Institutional Equity PlanDr Janelle Chiasera discusses Developing an Institutional Equity Plan
Dr Janelle Chiasera discusses Developing an Institutional Equity Plan
 
Maria Machlowska i Elżbieta Sądel - "Appium: automatyzacja testów w Mobile"
Maria Machlowska i Elżbieta Sądel - "Appium: automatyzacja testów w Mobile"Maria Machlowska i Elżbieta Sądel - "Appium: automatyzacja testów w Mobile"
Maria Machlowska i Elżbieta Sądel - "Appium: automatyzacja testów w Mobile"
 
Цастын баруун орны халх М.Баянбулаг
Цастын баруун орны халх М.БаянбулагЦастын баруун орны халх М.Баянбулаг
Цастын баруун орны халх М.Баянбулаг
 
Xml+messaging+with+soap
Xml+messaging+with+soapXml+messaging+with+soap
Xml+messaging+with+soap
 
Chemoinformatics in Action
Chemoinformatics in ActionChemoinformatics in Action
Chemoinformatics in Action
 
INOBACION TECNICA Y DESARROLLO SOSTENIBLE
INOBACION TECNICA Y DESARROLLO SOSTENIBLE INOBACION TECNICA Y DESARROLLO SOSTENIBLE
INOBACION TECNICA Y DESARROLLO SOSTENIBLE
 
Exj 5
Exj 5Exj 5
Exj 5
 
Samsung galaxy s® iii
Samsung galaxy s® iiiSamsung galaxy s® iii
Samsung galaxy s® iii
 
Customer service behaviors 11 2012
Customer service behaviors 11 2012Customer service behaviors 11 2012
Customer service behaviors 11 2012
 
Tama 3 b3
Tama 3 b3Tama 3 b3
Tama 3 b3
 

Ähnlich wie ExtJS WebDriver

20130301 onbetwist eindhoven
20130301 onbetwist eindhoven20130301 onbetwist eindhoven
20130301 onbetwist eindhoven
Erik Duval
 

Ähnlich wie ExtJS WebDriver (15)

What's new in Rails5?
What's new in Rails5?What's new in Rails5?
What's new in Rails5?
 
So long, and thanks for all the tests (Scottish Developers 2014)
So long, and thanks for all the tests (Scottish Developers 2014)So long, and thanks for all the tests (Scottish Developers 2014)
So long, and thanks for all the tests (Scottish Developers 2014)
 
Requirejs
RequirejsRequirejs
Requirejs
 
The WordPress Hacker's Guide to the \Galaxy() [@Baltimore PHP]
The WordPress Hacker's Guide to the \Galaxy() [@Baltimore PHP]The WordPress Hacker's Guide to the \Galaxy() [@Baltimore PHP]
The WordPress Hacker's Guide to the \Galaxy() [@Baltimore PHP]
 
Wphackergalaxy
WphackergalaxyWphackergalaxy
Wphackergalaxy
 
The WordPress Hacker's Guide to the \Galaxy() [@MidwestPHP]
The WordPress Hacker's Guide to the \Galaxy() [@MidwestPHP]The WordPress Hacker's Guide to the \Galaxy() [@MidwestPHP]
The WordPress Hacker's Guide to the \Galaxy() [@MidwestPHP]
 
20130301 onbetwist eindhoven
20130301 onbetwist eindhoven20130301 onbetwist eindhoven
20130301 onbetwist eindhoven
 
Symfony2 and MongoDB - MidwestPHP 2013
Symfony2 and MongoDB - MidwestPHP 2013   Symfony2 and MongoDB - MidwestPHP 2013
Symfony2 and MongoDB - MidwestPHP 2013
 
jQuery Mobile, Backbone.js, and ASP.NET MVC
jQuery Mobile, Backbone.js, and ASP.NET MVCjQuery Mobile, Backbone.js, and ASP.NET MVC
jQuery Mobile, Backbone.js, and ASP.NET MVC
 
HTML5.tx 2013: Embedded JavaScript, HTML5 and the Internet of Things
HTML5.tx 2013: Embedded JavaScript, HTML5 and the Internet of ThingsHTML5.tx 2013: Embedded JavaScript, HTML5 and the Internet of Things
HTML5.tx 2013: Embedded JavaScript, HTML5 and the Internet of Things
 
Information Architecture the Basics - User Needs
Information Architecture the Basics - User NeedsInformation Architecture the Basics - User Needs
Information Architecture the Basics - User Needs
 
Passing a Front end Developer interview
Passing a Front end Developer interview Passing a Front end Developer interview
Passing a Front end Developer interview
 
Rails Intro & Tutorial
Rails Intro & TutorialRails Intro & Tutorial
Rails Intro & Tutorial
 
Storyplayer
StoryplayerStoryplayer
Storyplayer
 
Building Lean, talk for #IWDevs
Building Lean, talk for #IWDevsBuilding Lean, talk for #IWDevs
Building Lean, talk for #IWDevs
 

Mehr von Andrii Dzynia

What does it mean to be a test engineer?
What does it mean to be a test engineer?What does it mean to be a test engineer?
What does it mean to be a test engineer?
Andrii Dzynia
 
Appium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriverAppium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriver
Andrii Dzynia
 
How to Manage Testing in Dynamic World
How to Manage Testing in Dynamic WorldHow to Manage Testing in Dynamic World
How to Manage Testing in Dynamic World
Andrii Dzynia
 
10 правил agile тестировщика IT-Brunch
10 правил agile тестировщика IT-Brunch10 правил agile тестировщика IT-Brunch
10 правил agile тестировщика IT-Brunch
Andrii Dzynia
 
Как не нужно писать Gherkin сценарии
Как не нужно писать Gherkin сценарииКак не нужно писать Gherkin сценарии
Как не нужно писать Gherkin сценарии
Andrii Dzynia
 
Что такое Exploratory Testing?
Что такое Exploratory Testing?Что такое Exploratory Testing?
Что такое Exploratory Testing?
Andrii Dzynia
 
Software testing 2.0
Software testing 2.0Software testing 2.0
Software testing 2.0
Andrii Dzynia
 
Testing Dojo Kyiv - Testing Heuristics
Testing Dojo Kyiv - Testing HeuristicsTesting Dojo Kyiv - Testing Heuristics
Testing Dojo Kyiv - Testing Heuristics
Andrii Dzynia
 

Mehr von Andrii Dzynia (20)

Continuous Delivery as you want it
Continuous Delivery as you want itContinuous Delivery as you want it
Continuous Delivery as you want it
 
Test coaching your agile team
Test coaching your agile teamTest coaching your agile team
Test coaching your agile team
 
Testing at Spotify
Testing at SpotifyTesting at Spotify
Testing at Spotify
 
What does it mean to be a test engineer?
What does it mean to be a test engineer?What does it mean to be a test engineer?
What does it mean to be a test engineer?
 
Exploring your unit tests
Exploring your unit testsExploring your unit tests
Exploring your unit tests
 
Hermetic environment for your functional tests
Hermetic environment for your functional testsHermetic environment for your functional tests
Hermetic environment for your functional tests
 
Quality Built In @ Spotify
Quality Built In @ SpotifyQuality Built In @ Spotify
Quality Built In @ Spotify
 
Applying testing mindset to software development
Applying testing mindset to software developmentApplying testing mindset to software development
Applying testing mindset to software development
 
Appium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriverAppium Mobile Test Automation like WebDriver
Appium Mobile Test Automation like WebDriver
 
How to Manage Testing in Dynamic World
How to Manage Testing in Dynamic WorldHow to Manage Testing in Dynamic World
How to Manage Testing in Dynamic World
 
10 правил agile тестировщика IT-Brunch
10 правил agile тестировщика IT-Brunch10 правил agile тестировщика IT-Brunch
10 правил agile тестировщика IT-Brunch
 
Working Software Over Comprehensive Documentation
Working Software Over Comprehensive DocumentationWorking Software Over Comprehensive Documentation
Working Software Over Comprehensive Documentation
 
«Самоорганизуй» себя, пока не «самоорганизовали» тебя
«Самоорганизуй» себя, пока не «самоорганизовали» тебя«Самоорганизуй» себя, пока не «самоорганизовали» тебя
«Самоорганизуй» себя, пока не «самоорганизовали» тебя
 
Как не нужно писать Gherkin сценарии
Как не нужно писать Gherkin сценарииКак не нужно писать Gherkin сценарии
Как не нужно писать Gherkin сценарии
 
iOS and Android Mobile Test Automation
iOS and Android Mobile Test AutomationiOS and Android Mobile Test Automation
iOS and Android Mobile Test Automation
 
10 правил Agile тестировщика
10 правил Agile тестировщика10 правил Agile тестировщика
10 правил Agile тестировщика
 
Что такое Exploratory Testing?
Что такое Exploratory Testing?Что такое Exploratory Testing?
Что такое Exploratory Testing?
 
Software testing 2.0
Software testing 2.0Software testing 2.0
Software testing 2.0
 
Тестировщики Vs Программисты
Тестировщики Vs ПрограммистыТестировщики Vs Программисты
Тестировщики Vs Программисты
 
Testing Dojo Kyiv - Testing Heuristics
Testing Dojo Kyiv - Testing HeuristicsTesting Dojo Kyiv - Testing Heuristics
Testing Dojo Kyiv - Testing Heuristics
 

Kürzlich hochgeladen

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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 ...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
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...
 
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
 
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
 
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
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
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
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 

ExtJS WebDriver

  • 1. WebDriver Tests for ExtJS Applications Andrii Dzynia Saturday, March 2, 13
  • 2.                              Andrii  Dzynia Saturday, March 2, 13
  • 3.                              Andrii  Dzynia Test  Engineer/Consultant/Trainer Saturday, March 2, 13
  • 4.                              Andrii  Dzynia Test  Engineer/Consultant/Trainer Saturday, March 2, 13
  • 5.                              Andrii  Dzynia Test  Engineer/Consultant/Trainer Saturday, March 2, 13
  • 6.                              Andrii  Dzynia Test  Engineer/Consultant/Trainer Saturday, March 2, 13
  • 7.                              Andrii  Dzynia Test  Engineer/Consultant/Trainer @adzynia Saturday, March 2, 13
  • 8.                              Andrii  Dzynia Test  Engineer/Consultant/Trainer @adzynia h8p://adzynia.com Saturday, March 2, 13
  • 9.                              Andrii  Dzynia Test  Engineer/Consultant/Trainer @adzynia h8p://adzynia.com Saturday, March 2, 13
  • 10. Technical Context • Java Enterprise Application • ExtJS on UI level • WebDriver for Test Automation Saturday, March 2, 13
  • 11. What is ExtJS? Ext JS is a pure JavaScript application framework for building interactive web applications using techniques such as Ajax, DHTML and DOM scripting. Saturday, March 2, 13
  • 12. Demo http://docs.sencha.com/ext-js/4-1/extjs-build/examples/ Saturday, March 2, 13
  • 13. First Stage As Usual Saturday, March 2, 13
  • 14. Locators • css = button[id *= ‘add_user_action’] • css = .x-panel.x-grid-with-row-lines • name = title • xpath = "//*[@class='x-column-header-text' and text()='Due Date']" Saturday, March 2, 13
  • 20. Results Traditional approach Code can be too complex Help in simple cases No reusable components Saturday, March 2, 13
  • 21. Who was solving this before? • https://github.com/mariominati/test-www- selenium-extjs/tree/master/Test-WWW- Selenium-ExtJS • https://github.com/asaflevy/SelenuimExtend/  • https://github.com/cathoderay/selenium- extjs • http://code.google.com/p/extenium/ Saturday, March 2, 13
  • 22. Second Stage ExtJSElementObjects Saturday, March 2, 13
  • 28. Results Reusable components WebDriver is so slow Can be extended IE is critical slow! Saturday, March 2, 13
  • 29. Stage 3 JavaScript Injections Saturday, March 2, 13
  • 30. ExtJS API Ext.get('id').dom.value Ext.ComponentQuery.query('panel[cls=myCls]'); Ext.select(selector) Ext.core.Element.select(selector, unique, root) Ext.getDom(el) Saturday, March 2, 13
  • 33. Results Not real-user Faster! actions Saturday, March 2, 13
  • 34. Lessons Learned • Think how you will be testing at first • Work side-by-side with front-end developers • Delegate ExtJS magic for your Elements API Saturday, March 2, 13
  • 35. @a dz me yn @a ia dz yn ia.c om ad zy n ia. co m Saturday, March 2, 13