development of automated tests for ext js based web sites
TRANSCRIPT
Development of Automated tests for ExtJS-based web sites
The tool set selection
BadBoy Selenium CodedUI
◦ Uses Selenium behind the scene Siesta
◦ Uses Selenium behind the scene HP Unified Functional Testing
◦ Too expensive TestComplete
◦ Too expensive
Tools to compare
Selenium Architecture
WebDriver
Browser adapters
Appium, Selendroid, IOSdriver
JSON Wire Protocol
JSON Wire Protocol
becomes the standard…
to work with various browsers in the same way
Status of WebDriver Protocol
All popular browsers support WebDriver protocol so cross-browser compatibility is provided for free
Cross-platform code - the same code works on multiple platforms without changes
Benefits of being a standard
OS supported Browsers supported Automation type Documentation and Support License Solution Development and Maintenance Testing types supported
Comparison criteria
OS Supported
WebDriver Badboy
• Windows• Linux• Mac OS• Solaris• UNIX family• Android• iOS
• Windows
Browsers Supported
WebDriver Badboy
• Firefox• IE• Safari• Opera• Chrome• Mobile Safari• Mobile Android
• IE 8
Automation type
WebDriver Badboy
• Operates with any browser with variety of configurations
• Code based automation
• Languages: Java, C#, Perl, PHP, Python, Ruby, and many others
• Operates with IE engine on the local machine
• Browser configurations are not available.
• Step based recording and playing solution with JavaScript customization
Support and Documentation
WebDriver Badboy
• Regular new builds and bug fixes available
• Public issues tracker
• Complete documentation • Tutorials and best practices• Many forums and articles• Code examples• Open source
• 4 years old build• Support is declared
• Complete documentation• Discussion forum on the
official site
License
WebDriver Badboy
• Open source, licensed under Apache 2.0 License
• Free for non-commercial use
• Pricing (more that 5 users)– Individual license – $45– 10 licenses pack – $300– Wave test manager – $89
Solution Development and Maintenance
WebDriver Badboy
• Various solution architectures
• Typical source code management approach
• No architecture, just recorded trace and customization JavaScript snippets
• Number of tool-specific XMLs
Selenium test example
Project Structure Page Object Pattern
Test Method
Badboy test example (the same test) Test Method
Variables values
Compiled into xml file
Testing types supported
WebDriver Badboy
• Functional testing• Performance testing• Stress testing• Cross-browser
compatibility testing
• Functional testing
Selenium Grid
Браузер
Node Node Node
Client
Client
Client
Браузер
Hub
Execution of tests can be distributes across multiple machines (physical and/or virtual)
Tests are executed in parallel to either reduce the testing time or create the appropriate load
Using CSS locators (default straightforward way)input[id*=datefield]div[id*=manageentry].x-window div[id*=filegrid].x-panel-body
Using ExtJS custom classes with front-end devs help (in case first variant could not help):div[cls=someCls]
Using ExtJS API (reserved way – for any other case):WebElement element = (WebElement) executeJavaScript("return Ext.getBody().dom.children[2].getElementsByTagName('table')[0];");
Selenium VS ExtJS locators
Automaton effort comparison