SlideShare a Scribd company logo
1 
Automation Abstractions 
Do you suffer from brittle automation? Are your tests slowing down 
as they age? Do you find your tests hard to read? If so, you, and 
your team, might be suffering from IAA. 
Inadequate Automation Abstraction (IAA) afflicts many teams. 
An obsession with a single layer of abstraction? Beliefs such as 
"Everything goes in a feature file", or "Everything is a Page 
Object". Do you suffer from excessive 'given when and then'? 
IAA takes many forms. Together we will explore the common 
manifestations we've seen. And the steps we took to help teams 
break their dependence on inadequate abstraction. 
Some of you may even be in the grip of IAA now. Don't worry. We 
can help you too. 
We will adopt a spirit of openness and inclusion. We attach no 
shame to IAA. We will help you work through it. Alternative 
possibilities are open to you. All of our trained facilitators are ex- 
IAA sufferers; they understand, and they can help.
2 
Automation Abstractions: The plan 
10:00 – 11:15 (75 mins) 
● I have code and slides I can show 
● You could sit and listen to me talk for 75 minutes 
OR 
(and this is really what the summit is all about) 
● You let me talk for 15 mins to set the scene with a whistle stop 
tour of automation abstractions 
● Then we have a “facilitated discussion” for 60 mins 
– Your: Experiences, Approaches, Lessons 
Learned, Biases, Opinions
Automation Abstractions 
A Test Management Summit Facilitiated Session 
Alan Richardson 
@eviltester 
alan@compendiumdev.co.uk 
www.SeleniumSimplified.com 
www.EvilTester.com 
www.CompendiumDev.co.uk 
www.JavaForTesters.com
4 
Blogs and Websites 
● CompendiumDev.co.uk 
● SeleniumSimplified.com 
● EvilTester.com 
● JavaForTesters.com 
● Twitter: @eviltester 
Online Training Courses 
● Technical Web Testing 101 
Unow.be/at/techwebtest101 
● Intro to Selenium 
Unow.be/at/startwebdriver 
● Selenium 2 WebDriver API 
Unow.be/at/webdriverapi 
Videos 
youtube.com/user/EviltesterVideos 
Books 
Selenium Simplified 
Unow.be/rc/selsimp 
Java For Testers 
leanpub.com/javaForTesters 
Alan Richardson 
uk.linkedin.com/in/eviltester 
Independent Test Consultant 
& Custom Training 
Contact Alan 
http://compendiumdev.co.uk/contact
“I must create a system. or be 
enslav'd by another Mans; I 
will not reason & compare: 
my business is to create” 
5 
William Blake, 
Jerusalem: The Emanation of the Giant Albion 
http://www.blakearchive.org/exist/blake/archive/object.xq?objectid=jerusalem.e.illbk.10&java=no
6 
Abstraction 
● Modelling 
● Separation of concerns 
● Logical vs Physical 
● Functional vs Structural 
● Interfaces vs Implementations 
● Data / Entities / Persistence 
● Functionality / Task Flow 
● Goals / Strategies 
● Layers – GUI, DB, HTTP 
● Etc.
7 
Example Test Without Abstraction 
@Before 
public void startDriver(){ 
@Test 
public void canCreateAToDoWithNoAbstraction(){ 
driver.get("http://todomvc.com/architecture-examples/backbone/"); 
int originalNumberOfTodos = driver.findElements( 
By.cssSelector("ul#todo-list li")).size(); 
WebElement createTodo = driver.findElement(By.id("new-todo")); 
createTodo.click(); 
createTodo.sendKeys("new task"); 
createTodo.sendKeys(Keys.ENTER); 
assertThat(driver.findElement( 
By.id("filters")).isDisplayed(), is(true)); 
int newToDos = driver.findElements( 
By.cssSelector("ul#todo-list li")).size(); 
assertThat(newToDos, greaterThan(originalNumberOfTodos)); 
} 
driver = new FirefoxDriver(); 
} 
@After 
public void stopDriver(){ 
driver.close(); 
driver.quit(); 
}
8 
Example Test With Abstraction 
@Before 
public void startDriver(){ 
@Test 
public void canCreateAToDoWithAbstraction(){ 
TodoMVCUser user = new TodoMVCUser(driver, new TodoMVCSite()); 
user.opensApplication().and().createNewToDo("new task"); 
ApplicationPageFunctional page = 
new ApplicationPageFunctional(driver, new TodoMVCSite()); 
assertThat(page.getCountOfTodoDoItems(), is(1)); 
assertThat(page.isFooterVisible(), is(true)); 
} 
driver = new FirefoxDriver(); 
} 
@After 
public void stopDriver(){ 
driver.close(); 
driver.quit(); 
}
9 
Why Abstraction? 
● Change implementations 
● Single Responsibility – only changes when 
necessary 
● Makes automation readable and maintainable
10 
Common Automation Abstractions 
● Page Objects 
● Element Abstractions: select, textbox, etc. 
● Domain Objects 
● Gherkin (Given/When/And/Then) 
● Domain Specific Languages
11 
Abstraction != Implementation 
● Abstraction != Tool / Framework / 
Implementation 
● Gherkin != Cucumber 
● Page Object != Page Factory 
● DSL != Keyword Driven 
If we want to get good at abstraction then we 
need to model, split apart, and make the 
relationships clear
12 
Throwing it open to the floor 
The following slides are to aid discussion only, 
and may not be needed – that depends on you.
13 
Common Automation Abstractions 
● Page Objects 
● Element Abstractions: select, textbox, etc. 
● Domain Objects 
● Gherkin (Given/When/And/Then) 
● Domain Specific Languages 
● Any More? 
– Create a List to discuss 
– Any public examples? 
– Any examples in the room that can be shared?
14 
Problems, Problems, Problems 
What problems have you seen? 
● Can you respond to change? 
● Is your framework hard to learn? 
● Who hates it? 
● Do you suffer from intermittent execution? 
● Who maintains it? 
● Automation Technical Debt?
15 
Decisions, Decisions 
What Design Decisions have you made? 
● Page Object Design Decisions? 
● Navigation Decisions? 
● Tool Layers? 
● What rules do you have?
16 
Biases and Mandates 
What Mandates have your decisions led to? 
● All automation must use Given/When/Then? 
● Execution layer is Gherkin? No xUnit? 
● Page Objects must never return other Page 
Objects? 
● Never pass Domain Objects into Page Objects? 
● Never add an assert to the abstraction layer 
● Never use implicit waits
17 
Success, Success, Success 
● What worked well? 
● What did you change to get it working well?
18 
Possibilities, Possibilities 
● What have you yet to try? 
– Anyone with experience of that?
19 
End Notes 
Proceed no further, lest ye want to finish
20 
“To the creative mind there is 
no right or wrong. Every 
action is an experiment, and 
every experiment yields its 
fruit in knowledge.” 
The Illuminatus Trilogy 
Robert Anton Wilson

More Related Content

ODP
How to Improve Your Technical Test Ability - AADays 2015 Keynote
PDF
Automating to Augment Testing
PDF
Black Ops Testing Workshop from Agile Testing Days 2014
PDF
Automating Tactically vs Strategically SauceCon 2020
PDF
Technical Testing Webinar
PDF
Practical Test Automation Deep Dive
PDF
Technology Based Testing
PDF
Selenium Clinic Eurostar 2012 WebDriver Tutorial
How to Improve Your Technical Test Ability - AADays 2015 Keynote
Automating to Augment Testing
Black Ops Testing Workshop from Agile Testing Days 2014
Automating Tactically vs Strategically SauceCon 2020
Technical Testing Webinar
Practical Test Automation Deep Dive
Technology Based Testing
Selenium Clinic Eurostar 2012 WebDriver Tutorial

What's hot (20)

PDF
If you want to automate, you learn to code
PDF
Devfest 2019-slides
PDF
Lessons Learned When Automating
PDF
Confessions of an Accidental Security Tester
PDF
Evil testers guide to technical testing
PDF
Add More Security To Your Testing and Automating - Saucecon 2021
PDF
Automating Pragmatically - Testival 20190604
PDF
Automating Strategically or Tactically when Testing
PDF
Effective Software Testing for Modern Software Development
PDF
Open source tools - Test Management Summit - 2009
PDF
TestIstanbul May 2013 Keynote Experiences With Exploratory Testing
PDF
Secrets and Mysteries of Automated Execution Keynote slides
PPTX
Risk Mitigation Using Exploratory and Technical Testing - QASymphony Webinar ...
PDF
The Evil Tester's Guide to HTTP proxies Tutorial
PDF
Test Bash Netherlands Alan Richardson "How to misuse 'Automation' for testing...
PDF
Odinstar 2017 - Real World Automating to Support Testing
PDF
Efficient JavaScript Unit Testing, May 2012
PDF
Unit and functional testing with Siesta
PDF
Technical and Testing Challenges: Using the "Protect The Square" Game
PDF
Getting By Without "QA"
If you want to automate, you learn to code
Devfest 2019-slides
Lessons Learned When Automating
Confessions of an Accidental Security Tester
Evil testers guide to technical testing
Add More Security To Your Testing and Automating - Saucecon 2021
Automating Pragmatically - Testival 20190604
Automating Strategically or Tactically when Testing
Effective Software Testing for Modern Software Development
Open source tools - Test Management Summit - 2009
TestIstanbul May 2013 Keynote Experiences With Exploratory Testing
Secrets and Mysteries of Automated Execution Keynote slides
Risk Mitigation Using Exploratory and Technical Testing - QASymphony Webinar ...
The Evil Tester's Guide to HTTP proxies Tutorial
Test Bash Netherlands Alan Richardson "How to misuse 'Automation' for testing...
Odinstar 2017 - Real World Automating to Support Testing
Efficient JavaScript Unit Testing, May 2012
Unit and functional testing with Siesta
Technical and Testing Challenges: Using the "Protect The Square" Game
Getting By Without "QA"
Ad

Similar to Abstraction Layers Test Management Summit Faciliated Session 2014 (20)

PDF
Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...
PPTX
A Sampling of Tools
PPTX
Creating testing tools to support development
PPTX
Browser Automated Testing Frameworks - Nightwatch.js
PDF
A lean automation blueprint for testing in continuous delivery
PPTX
Get the Balance Right: Acceptance Test Driven Development, GUI Automation and...
PDF
Saksham Sarode - Innovation Through Introspection - EuroSTAR 2012
PPTX
Agile development practices - How do they really work ?
PDF
Automation Abstractions: Page Objects and Beyond
PDF
19 creamer et workshop-agile2019-wash_pp_16-9_1
PDF
Automation testing: how tools are important?
PDF
A Software Tester's Travels from the Land of the Waterfall to the Land of Agi...
PPTX
DotNet unit testing training
PPTX
Test automation and Agile software development
PPTX
Automated tests
PDF
The Final Frontier, Automating Dynamic Security Testing
PPT
Lessons Learned in a Continuously Developing Service-Oriented Architecture
DOC
Questions1
PDF
Demise of test scripts rise of test ideas
PPT
You shouldneverdo
Hands on Exploration of Page Objects and Abstraction Layers with Selenium Web...
A Sampling of Tools
Creating testing tools to support development
Browser Automated Testing Frameworks - Nightwatch.js
A lean automation blueprint for testing in continuous delivery
Get the Balance Right: Acceptance Test Driven Development, GUI Automation and...
Saksham Sarode - Innovation Through Introspection - EuroSTAR 2012
Agile development practices - How do they really work ?
Automation Abstractions: Page Objects and Beyond
19 creamer et workshop-agile2019-wash_pp_16-9_1
Automation testing: how tools are important?
A Software Tester's Travels from the Land of the Waterfall to the Land of Agi...
DotNet unit testing training
Test automation and Agile software development
Automated tests
The Final Frontier, Automating Dynamic Security Testing
Lessons Learned in a Continuously Developing Service-Oriented Architecture
Questions1
Demise of test scripts rise of test ideas
You shouldneverdo
Ad

More from Alan Richardson (18)

PDF
The Future of Testing Webinar
PDF
Joy of Coding Conference 2019 slides - Alan Richardson
PDF
Programming katas for Software Testers - CounterStrings
PDF
About Consultant Alan Richardson Compendium Developments Evil Tester
PDF
Shift left-testing
PDF
Automating and Testing a REST API
PDF
TDD - Test Driven Development - Java JUnit FizzBuzz
PDF
How To Test With Agility
PDF
Your Automated Execution Does Not Have to be Flaky
PDF
What is Testability vs Automatability? How to improve your Software Testing.
PDF
What is Agile Testing? A MindMap
PDF
Evil Tester's Guide to Agile Testing
PDF
The Evil Tester Show - Episode 001 Halloween 2017
PDF
What is Regression Testing?
PDF
Simple ways to add and work with a `.jar` file in your local maven setup
PDF
Re-thinking Test Automation and Test Process Modelling (in pictures)
PDF
Learning in Public - A How to Speak in Public Workshop
PDF
How to Practise to Remove Fear of Public Speaking
The Future of Testing Webinar
Joy of Coding Conference 2019 slides - Alan Richardson
Programming katas for Software Testers - CounterStrings
About Consultant Alan Richardson Compendium Developments Evil Tester
Shift left-testing
Automating and Testing a REST API
TDD - Test Driven Development - Java JUnit FizzBuzz
How To Test With Agility
Your Automated Execution Does Not Have to be Flaky
What is Testability vs Automatability? How to improve your Software Testing.
What is Agile Testing? A MindMap
Evil Tester's Guide to Agile Testing
The Evil Tester Show - Episode 001 Halloween 2017
What is Regression Testing?
Simple ways to add and work with a `.jar` file in your local maven setup
Re-thinking Test Automation and Test Process Modelling (in pictures)
Learning in Public - A How to Speak in Public Workshop
How to Practise to Remove Fear of Public Speaking

Recently uploaded (20)

PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
L1 - Introduction to python Backend.pptx
PDF
System and Network Administration Chapter 2
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
System and Network Administraation Chapter 3
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PPT
Introduction Database Management System for Course Database
PDF
top salesforce developer skills in 2025.pdf
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
ai tools demonstartion for schools and inter college
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
medical staffing services at VALiNTRY
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
ManageIQ - Sprint 268 Review - Slide Deck
Operating system designcfffgfgggggggvggggggggg
Design an Analysis of Algorithms II-SECS-1021-03
L1 - Introduction to python Backend.pptx
System and Network Administration Chapter 2
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Adobe Illustrator 28.6 Crack My Vision of Vector Design
System and Network Administraation Chapter 3
PTS Company Brochure 2025 (1).pdf.......
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
Introduction Database Management System for Course Database
top salesforce developer skills in 2025.pdf
2025 Textile ERP Trends: SAP, Odoo & Oracle
ai tools demonstartion for schools and inter college
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
How to Choose the Right IT Partner for Your Business in Malaysia
Navsoft: AI-Powered Business Solutions & Custom Software Development
medical staffing services at VALiNTRY
CHAPTER 2 - PM Management and IT Context
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)

Abstraction Layers Test Management Summit Faciliated Session 2014

  • 1. 1 Automation Abstractions Do you suffer from brittle automation? Are your tests slowing down as they age? Do you find your tests hard to read? If so, you, and your team, might be suffering from IAA. Inadequate Automation Abstraction (IAA) afflicts many teams. An obsession with a single layer of abstraction? Beliefs such as "Everything goes in a feature file", or "Everything is a Page Object". Do you suffer from excessive 'given when and then'? IAA takes many forms. Together we will explore the common manifestations we've seen. And the steps we took to help teams break their dependence on inadequate abstraction. Some of you may even be in the grip of IAA now. Don't worry. We can help you too. We will adopt a spirit of openness and inclusion. We attach no shame to IAA. We will help you work through it. Alternative possibilities are open to you. All of our trained facilitators are ex- IAA sufferers; they understand, and they can help.
  • 2. 2 Automation Abstractions: The plan 10:00 – 11:15 (75 mins) ● I have code and slides I can show ● You could sit and listen to me talk for 75 minutes OR (and this is really what the summit is all about) ● You let me talk for 15 mins to set the scene with a whistle stop tour of automation abstractions ● Then we have a “facilitated discussion” for 60 mins – Your: Experiences, Approaches, Lessons Learned, Biases, Opinions
  • 3. Automation Abstractions A Test Management Summit Facilitiated Session Alan Richardson @eviltester alan@compendiumdev.co.uk www.SeleniumSimplified.com www.EvilTester.com www.CompendiumDev.co.uk www.JavaForTesters.com
  • 4. 4 Blogs and Websites ● CompendiumDev.co.uk ● SeleniumSimplified.com ● EvilTester.com ● JavaForTesters.com ● Twitter: @eviltester Online Training Courses ● Technical Web Testing 101 Unow.be/at/techwebtest101 ● Intro to Selenium Unow.be/at/startwebdriver ● Selenium 2 WebDriver API Unow.be/at/webdriverapi Videos youtube.com/user/EviltesterVideos Books Selenium Simplified Unow.be/rc/selsimp Java For Testers leanpub.com/javaForTesters Alan Richardson uk.linkedin.com/in/eviltester Independent Test Consultant & Custom Training Contact Alan http://compendiumdev.co.uk/contact
  • 5. “I must create a system. or be enslav'd by another Mans; I will not reason & compare: my business is to create” 5 William Blake, Jerusalem: The Emanation of the Giant Albion http://www.blakearchive.org/exist/blake/archive/object.xq?objectid=jerusalem.e.illbk.10&java=no
  • 6. 6 Abstraction ● Modelling ● Separation of concerns ● Logical vs Physical ● Functional vs Structural ● Interfaces vs Implementations ● Data / Entities / Persistence ● Functionality / Task Flow ● Goals / Strategies ● Layers – GUI, DB, HTTP ● Etc.
  • 7. 7 Example Test Without Abstraction @Before public void startDriver(){ @Test public void canCreateAToDoWithNoAbstraction(){ driver.get("http://todomvc.com/architecture-examples/backbone/"); int originalNumberOfTodos = driver.findElements( By.cssSelector("ul#todo-list li")).size(); WebElement createTodo = driver.findElement(By.id("new-todo")); createTodo.click(); createTodo.sendKeys("new task"); createTodo.sendKeys(Keys.ENTER); assertThat(driver.findElement( By.id("filters")).isDisplayed(), is(true)); int newToDos = driver.findElements( By.cssSelector("ul#todo-list li")).size(); assertThat(newToDos, greaterThan(originalNumberOfTodos)); } driver = new FirefoxDriver(); } @After public void stopDriver(){ driver.close(); driver.quit(); }
  • 8. 8 Example Test With Abstraction @Before public void startDriver(){ @Test public void canCreateAToDoWithAbstraction(){ TodoMVCUser user = new TodoMVCUser(driver, new TodoMVCSite()); user.opensApplication().and().createNewToDo("new task"); ApplicationPageFunctional page = new ApplicationPageFunctional(driver, new TodoMVCSite()); assertThat(page.getCountOfTodoDoItems(), is(1)); assertThat(page.isFooterVisible(), is(true)); } driver = new FirefoxDriver(); } @After public void stopDriver(){ driver.close(); driver.quit(); }
  • 9. 9 Why Abstraction? ● Change implementations ● Single Responsibility – only changes when necessary ● Makes automation readable and maintainable
  • 10. 10 Common Automation Abstractions ● Page Objects ● Element Abstractions: select, textbox, etc. ● Domain Objects ● Gherkin (Given/When/And/Then) ● Domain Specific Languages
  • 11. 11 Abstraction != Implementation ● Abstraction != Tool / Framework / Implementation ● Gherkin != Cucumber ● Page Object != Page Factory ● DSL != Keyword Driven If we want to get good at abstraction then we need to model, split apart, and make the relationships clear
  • 12. 12 Throwing it open to the floor The following slides are to aid discussion only, and may not be needed – that depends on you.
  • 13. 13 Common Automation Abstractions ● Page Objects ● Element Abstractions: select, textbox, etc. ● Domain Objects ● Gherkin (Given/When/And/Then) ● Domain Specific Languages ● Any More? – Create a List to discuss – Any public examples? – Any examples in the room that can be shared?
  • 14. 14 Problems, Problems, Problems What problems have you seen? ● Can you respond to change? ● Is your framework hard to learn? ● Who hates it? ● Do you suffer from intermittent execution? ● Who maintains it? ● Automation Technical Debt?
  • 15. 15 Decisions, Decisions What Design Decisions have you made? ● Page Object Design Decisions? ● Navigation Decisions? ● Tool Layers? ● What rules do you have?
  • 16. 16 Biases and Mandates What Mandates have your decisions led to? ● All automation must use Given/When/Then? ● Execution layer is Gherkin? No xUnit? ● Page Objects must never return other Page Objects? ● Never pass Domain Objects into Page Objects? ● Never add an assert to the abstraction layer ● Never use implicit waits
  • 17. 17 Success, Success, Success ● What worked well? ● What did you change to get it working well?
  • 18. 18 Possibilities, Possibilities ● What have you yet to try? – Anyone with experience of that?
  • 19. 19 End Notes Proceed no further, lest ye want to finish
  • 20. 20 “To the creative mind there is no right or wrong. Every action is an experiment, and every experiment yields its fruit in knowledge.” The Illuminatus Trilogy Robert Anton Wilson