w16 automation frameworks - anand ramdeo
DESCRIPTION
EuroSTAR Software Testing Conference 2012 presentation onTRANSCRIPT
Automation Frameworks Don't Design, Let it Evolve
Anand Ramdeo
@testinggeek
Problem Driven test automation framework
Sequential execution
Not easy to data drive
Firefox Plugin easy to install
Record & Playback
Easy execution
Help @ Hand
Export as WebDriver Script
Excellent First Step
No Basic Programming
constructs
Can not go beyond pages
Crawling is fun but we don’t crawl
anymore
What happens when script is executed second time?
Guaranteed Username
How would test respond to changes in GUI or business rules?
Re
adab
le
Main
tainab
le
Difficult to Progress
Decoupling Separatio
n o
f con
cerns
Ab
straction
Less friction, More development
Page instead of elements
What if new fields are added?
One place to find elements
Page Initializes everything
Functions applicable on elements are exposed by page
Intelligent page objects
What if business decide to have multi page registration or multiple welcome pages?
Test has no knowledge of physical implementation
What if business needs to capture more data?
Domain objects & workflow
What if there are different types of users and difference channels of registration?
Actor
Performs Work
Check Results
Same steps over and over again
Randomization
Power of Abstraction
User.registersOnSite()
- Choose a random path to reach at registration page.
- Generate random valid data based on the business rules for specific fields.
- Fill form in random order
- Choose a method to save form or send data using http
Test is • Readable and maintainable. • Will not be affected by changes in the physical
implementation. • Will not be affected by changes in the business rules. • Can increase value of automation behind the scene • Was evolved by solving one problem at a time.
Problem
Solved by performing work
On some interface
App solves the problem
Test proves That problem is solved
App allows actors to work
Test proves that actor can perform work
Value Enhancer
Anand Ramdeo
@testinggeek