selenium camp 2012
DESCRIPTION
Designing Automation Framework for Web Applications Testing through TDDTRANSCRIPT
![Page 1: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/1.jpg)
• Anatoly Zhukov [email protected]
• Yan Alexeenko [email protected]
Designing Automation Framework for Web Applications
Testing through TDD
![Page 2: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/2.jpg)
About Us
2
Yan Alexeenko - Senior QA Engineer• 4+ years of experience• Expert in desktop/web manual/automation testing• Expert in performance testing• Expert in testing of signal processing algorithms • Test framework developer
Anatoly Zhukov - Senior QA Engineer.• 3+ years of experience• Expert in desktop/web manual/automation testing• Expert in performance testing• Test framework developer• Active participation in software-testing.ru community
![Page 3: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/3.jpg)
About GGA Software Services
3
200-Person Software Engineering Team:• Business Analysis• System Design• Software Engineering• Software Testing• Documentation• Training• Project Management• Quality Assurance
GGA’s high-throughput screening application won a global innovation award at a leading pharmaceutical company.
Data
SupportScience
Software
Quality Assured• Independent team for testing
and quality assurance• 70 professionally trained quality
engineers• Domain experts in scientific
disciplines and software/IT technical skills• QA services available to assist
client’s internal development teams
![Page 4: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/4.jpg)
Presentation Plan
4
Objectives
Development Problems
Problems Resolving
Techniques & Technologies
Object Patterns
Reporting
Results
![Page 5: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/5.jpg)
Our Objectives
Flexible
Convenient
Scale
Functional
Fast
5
![Page 6: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/6.jpg)
6
Development Scheme
Customer
I want to…
Developer
Manager
My vision
of it is…I believe he wants…
![Page 7: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/7.jpg)
Development Problems
7
![Page 8: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/8.jpg)
What’s doing?
Customer
8
![Page 9: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/9.jpg)
In our case
9
I know what I want…
I know how to do it…
![Page 10: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/10.jpg)
TDD
Build manager
Continuous Integration
Simple Object Pattern
Simple Result Analysis
10
We want…
![Page 11: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/11.jpg)
Java
Selenium 2 (aka WebDriver)
TestNG
AutoIT
11
We use…
![Page 12: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/12.jpg)
Test Driven Development
12
The mantra of Test-Driven Development (TDD) is “red, green, refactor”
Make the code work
Eliminate redundancy
Write a test that fails
Write a test script code that can’t be compiled
![Page 13: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/13.jpg)
Maven
Maven is a software project management and
comprehension tool
Maven is a site and documentation tool
Maven extends Ant to let you download dependencies
Maven is a set of reusable Ant scripts
What is wrong with Maven? – Access to repository.
13
![Page 14: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/14.jpg)
Object Description
14
Panel – div that contains simple controls
Controls – Links, Buttons, Inputs, etc.
![Page 15: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/15.jpg)
Object Description
15
<div id=“subpanel1_3” class=“…” style=“…”>
<input id=“pageNumberInput” … >
![Page 16: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/16.jpg)
Code of Test
16
Panel.get().action().control
.controlAction().[action()/control]…;
Singleton
Return Panel instance
![Page 17: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/17.jpg)
Example
17
ControlPane.get().open().page.click().fullScreen.click().close();
public class ControlPane extends BasePanel<ControlPane>…
public final Button<ControlPane> page = new Button<ControlPane>("Name", "Locator", this);
…
Generic
![Page 18: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/18.jpg)
Using Standard Maven Layout &
ResourceBundle
18
Properties for Panels & Controls
ControlName = [id/xpath/css]=[locator]
Properties like
![Page 19: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/19.jpg)
Reporting
Simple & Dynamic Creation
Style Customization
Easy for Use
• Visualization (Levels, Links to source code, Screenshots,
Asserts and Exceptions)
• Traceability
HTML 19
![Page 20: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/20.jpg)
Reporting Process
20
HTMLCSSJS
jquery.load()
Message 1
Log File
Message 2
Message 3
![Page 21: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/21.jpg)
Jenkins Tasks
21
Maven Goals & Options
-Dtestng_xml=[Config File].xml clean test
clean compile -DskipTests javadoc:aggregate
![Page 22: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/22.jpg)
Reporting Example
22
business level
component level
technical level
asserts
![Page 23: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/23.jpg)
Java Docs
23
![Page 24: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/24.jpg)
Convenient test writing framework
Flexible and extendable system
Simple and clear reports
Continuous Integration
Documented source code
Satisfied customer
24
Results
![Page 25: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/25.jpg)
Code Lifecycle
Test Script
ComponentsBase Functionality for testing
? ?
?
Controls
Selenium Web Driver
Reporter API
Unit testing Web Services
UI testing
…
25
![Page 26: Selenium Camp 2012](https://reader033.vdocuments.net/reader033/viewer/2022051610/549eab33ac795906768b47f2/html5/thumbnails/26.jpg)
26
Questions?