SlideShare a Scribd company logo
@wakaleo
The evolution of automated testing practices
Take me on a journey
@wakaleo
@wakaleo
John
Ferguson
Smart
Introductions
“I help teams of smart people 

learn to work together more efficiently, 

to deliver better software faster”
@wakaleo
Test Automation
Do it well, or don’t do it at all
@wakaleo
How much are your tests worth?
Weekly cost
vs
weekly savings
$0
$20,000
$40,000
$60,000
$80,000
$100,000
$120,000
$140,000
$160,000
$180,000
1/09/2015 1/10/2015 1/11/2015 1/12/2015
Test0suite0cost0vs0savings0(per0week)
Cost0saved0par0week Test0suite0cost0per0week
@wakaleo
How much are your tests worth?
Weekly cost
vs
weekly savings
$0
$20,000
$40,000
$60,000
$80,000
$100,000
$120,000
$140,000
$160,000
$180,000
1/09/2015 1/10/2015 1/11/2015 1/12/2015
Test0suite0cost0vs0savings0(per0week)
Cost0saved0par0week Test0suite0cost0per0week
Team cost is constant
@wakaleo
How much are your tests worth?
Weekly cost
vs
weekly savings
$0
$20,000
$40,000
$60,000
$80,000
$100,000
$120,000
$140,000
$160,000
$180,000
1/09/2015 1/10/2015 1/11/2015 1/12/2015
Test0suite0cost0vs0savings0(per0week)
Cost0saved0par0week Test0suite0cost0per0week
Team cost is constant
Time saved increases with the
number of executed
@wakaleo
How much are your tests worth?
$0
$200,000
$400,000
$600,000
$800,000
$1,000,000
$1,200,000
1/09/2015 1/10/2015 1/11/2015 1/12/2015
What0is0your0test0suite0worth?
Test0suite0ROI Test0suite0cost
Cumulated cost
vs
cumulated savings
@wakaleo
How much are your tests worth?
$0
$200,000
$400,000
$600,000
$800,000
$1,000,000
$1,200,000
1/09/2015 1/10/2015 1/11/2015 1/12/2015
What0is0your0test0suite0worth?
Test0suite0ROI Test0suite0cost
Cumulated cost
vs
cumulated savings
Cumulated value should increase
faster than cumulated cost
@wakaleo
Now factor in high maintenance
40-60%
Typical maintenance overhead
for poorly-written test suites
@wakaleo
Now factor in high maintenance
Number of tests
Maintenanceoverhead
@wakaleo
Now factor in high maintenance
Number of tests
Maintenanceoverhead
@wakaleo
$0
$50,000
$100,000
$150,000
$200,000
$250,000
$300,000
$350,000
$400,000
$450,000
$500,000
1/09/2015 1/10/2015 1/11/2015 1/12/2015 1/01/2016
What0is0your0test0suite0worth?
Test0suite0cost Test0suite0ROI
Now factor in high maintenance
High-maintenance costs
reduce the number of
tests a team can write
@wakaleo
$0
$50,000
$100,000
$150,000
$200,000
$250,000
$300,000
$350,000
$400,000
$450,000
$500,000
1/09/2015 1/10/2015 1/11/2015 1/12/2015 1/01/2016
What0is0your0test0suite0worth?
Test0suite0cost Test0suite0ROI
Now factor in high maintenance
High-maintenance costs
reduce the number of
tests a team can write
High maintenance costs can
cause your test suite to lose value
@wakaleo
Narrative Coding
Style
Open-Closed
Principle
Single
Responsibility
Principle
Separation of
Concerns
Software Engineering Principles can help you write
more maintainable tests
@wakaleo
Narrative Coding
Style
Open-Closed
Principle
Single
Responsibility
Principle
Separation of
Concerns
Software Engineering Principles can help you write
more maintainable tests
@wakaleo
Narrative Coding
Style
Open-Closed
Principle
Single
Responsibility
Principle
Separation of
Concerns
Software Engineering Principles can help you write
more maintainable tests
@wakaleo
Narrative Coding
Style
Open-Closed
Principle
Single
Responsibility
Principle
Separation of
Concerns
Software Engineering Principles can help you write
more maintainable tests
@wakaleo
Narrative Coding
Style
Open-Closed
Principle
Single
Responsibility
Principle
Separation of
Concerns
Software Engineering Principles can help you write
more maintainable tests
@wakaleo
Separation of Concerns - Layers
Goals
Tasks
Actions
@wakaleo
Separation of Concerns - Layers
Goals
Tasks
Actions
What are you trying to achieve?
@wakaleo
Separation of Concerns - Layers
Goals
Tasks
Actions
What are you trying to achieve?
What do you need to do to achieve
this goal?
@wakaleo
Separation of Concerns - Layers
Goals
Tasks
Actions
What are you trying to achieve?
What do you need to do to achieve
this goal?
What interactions with the
system do you need for each
task?
@wakaleo
Separation of Concerns - Layers
Scenario: Add a new todo entry on the todo home page

Given I am on the Todo application home page

When I enter 'Buy some milk' into the New Todo field

And I press ENTER

Then the todo list box should contain 'Buy some milk'
@wakaleo
Separation of Concerns - Layers
Scenario: Record a new todo action for future use

Given I need to buy some milk

When I add the todo action 'Buy some milk'

Then 'Buy some milk' should be recorded in my todo list
@wakaleo
Feature documentationDetailed feedbackHigh level feedback
Communication and documentation
@wakaleo
Feature documentationDetailed feedbackHigh level feedback
Communication and documentation
@wakaleo
Serenity BDD
“Because life is too short to
h a v e t o m a i n t a i n u g l y
automated test suites”
@wakaleo
Living
documentation
Strong Selenium
WebDriver support
JUnit, Cucumber
or JBehave
A layered approach
Serenity BDD
@wakaleo
The Serenity layered architecture
Goals
Tasks
Interactions
@wakaleo
The Serenity layered architecture
Goals
Tasks
Interactions
Tests or scenarios
@wakaleo
The Serenity layered architecture
Goals
Tasks
Interactions
Tests or scenarios
“Steps”
@wakaleo
The Serenity layered architecture
Goals
Tasks
Interactions
Tests or scenarios
“Steps”
Page Objects or other technical
components
@wakaleo
The Serenity layered architecture
Feature: Add new todos

James needs to be able to jot down actions he needs to do as he
thinks of them



Scenario: Record a new todo action for future use

Given James needs to buy some milk

When James adds the todo action 'Buy some milk'

Then 'Buy some milk' should be recorded in his todo list
@wakaleo
The Serenity layered architecture
Feature: Add new todos

James needs to be able to jot down actions he needs to do as he
thinks of them



Scenario: Record a new todo action for future use

Given James needs to buy some milk

When James adds the todo action 'Buy some milk'

Then 'Buy some milk' should be recorded in his todo list
A goal
@wakaleo
The Serenity layered architecture
Feature: Add new todos

James needs to be able to jot down actions he needs to do as he
thinks of them



Scenario: Record a new todo action for future use

Given James needs to buy some milk

When James adds the todo action 'Buy some milk'

Then 'Buy some milk' should be recorded in his todo list
A goal
A task
@wakaleo
The Serenity layered architecture
Feature: Add new todos

James needs to be able to jot down actions he needs to do as he
thinks of them



Scenario: Record a new todo action for future use

Given James needs to buy some milk

When James adds the todo action 'Buy some milk'

Then 'Buy some milk' should be recorded in his todo list
A goal
A task
@Steps ATodoUser james;



@When(“^(?:.*) (?:adds|has added) the todo action '(.*)'$")

public void i_add_the_todo_action(String actionName) {

james.adds_an_action_called(actionName);

}
@wakaleo
The Serenity layered architecture
Feature: Add new todos

James needs to be able to jot down actions he needs to do as he
thinks of them



Scenario: Record a new todo action for future use

Given James needs to buy some milk

When James adds the todo action 'Buy some milk'

Then 'Buy some milk' should be recorded in his todo list
A goal
A task
@Steps ATodoUser james;



@When(“^(?:.*) (?:adds|has added) the todo action '(.*)'$")

public void i_add_the_todo_action(String actionName) {

james.adds_an_action_called(actionName);

}
The task definition
@wakaleo
The Serenity layered architecture
Feature: Add new todos

James needs to be able to jot down actions he needs to do as he
thinks of them



Scenario: Record a new todo action for future use

Given James needs to buy some milk

When James adds the todo action 'Buy some milk'

Then 'Buy some milk' should be recorded in his todo list
A goal
A task
@Steps ATodoUser james;



@When(“^(?:.*) (?:adds|has added) the todo action '(.*)'$")

public void i_add_the_todo_action(String actionName) {

james.adds_an_action_called(actionName);

}
The task definition
TodoPage onTheTodoHomePage;



@Step

public void adds_an_action_called(String actionName) {

onTheTodoHomePage.addAnActionCalled(actionName);

}
@wakaleo
The Serenity layered architecture
Feature: Add new todos

James needs to be able to jot down actions he needs to do as he
thinks of them



Scenario: Record a new todo action for future use

Given James needs to buy some milk

When James adds the todo action 'Buy some milk'

Then 'Buy some milk' should be recorded in his todo list
A goal
A task
@Steps ATodoUser james;



@When(“^(?:.*) (?:adds|has added) the todo action '(.*)'$")

public void i_add_the_todo_action(String actionName) {

james.adds_an_action_called(actionName);

}
The task definition
TodoPage onTheTodoHomePage;



@Step

public void adds_an_action_called(String actionName) {

onTheTodoHomePage.addAnActionCalled(actionName);

}
An interaction
@wakaleo
Serenity for Living Documentation
Feature: Add new todos

I need to be able to jot down actions I need to do as fast as I think of them



Scenario: Record a new todo action for future use

Given I need to buy some milk

When I add the todo action 'Buy some milk'

Then 'Buy some milk' should be recorded in my todo list
@wakaleo
Serenity for Living Documentation
Feature: Add new todos

I need to be able to jot down actions I need to do as fast as I think of them



Scenario: Record a new todo action for future use

Given I need to buy some milk

When I add the todo action 'Buy some milk'

Then 'Buy some milk' should be recorded in my todo list
@wakaleo
Coding demo
@wakaleo
Hard to apply to
Single Page Apps
Need modifications
to extend
Multiple
Responsibilities
Bloat
Page Objects considered harmful
@wakaleo
Introducing the Journey Pattern
@wakaleo
Highly readable
style
Encourages reuse
and maintainable
code
Small, reusable
interaction
components
User-centric
The Journey Pattern
@wakaleo
Origins of the Journey Pattern in Serenity
Antony Marcano
2007
*
* Based on actual events
@wakaleo
Origins of the Journey Pattern in Serenity
Antony Marcano
“Page Objects kinda suck. Why
not try this pattern instead?”
Agile Alliance Functional Test Tools Workshop 2007
2007
*
* Based on actual events
@wakaleo
Origins of the Journey Pattern in Serenity
Antony Marcano
2007 2009
Andy Palmer
@wakaleo
Origins of the Journey Pattern in Serenity
Antony Marcano
2007 2009
More people should know
about this pattern
Andy Palmer
@wakaleo
Origins of the Journey Pattern in Serenity
Antony Marcano
2007 2009
More people should know
about this pattern
JNarrate
Andy Palmer
Let’s write a reference
implementation!
@wakaleo
Origins of the Journey Pattern in Serenity
Antony Marcano
2007 2009
“Coronation Street
rocks
2012
Andy Palmer
@wakaleo
Origins of the Journey Pattern in Serenity
Antony Marcano
2007 2009
“Coronation Street
rocks
2012
Andy Palmer
Eureka! “Soap Opera Personas”
@wakaleo
Andy Palmer
Origins of the Journey Pattern in Serenity
Antony Marcano
2007 2009 2012
Jan Molak
@wakaleo
Andy Palmer
Origins of the Journey Pattern in Serenity
Antony Marcano
2007 2009 2012
Jan Molak
You should call this “The
Journey Pattern”
@wakaleo
Andy Palmer
Origins of the Journey Pattern in Serenity
Antony Marcano
2007 2009 2012
Jan Molak
You should call this “The
Journey Pattern”
Damn!
@wakaleo
Andy Palmer
Origins of the Journey Pattern in Serenity
Antony Marcano
2007 2009 2012
Jan Molak
You should call this “The
Journey Pattern”
Damn!
Why didn’t we
think of that!
@wakaleo
Andy
Palmer
Origins of the Journey Pattern in Serenity
Antony
Marcano
2007 2009 2012
Jan Molak
2015
John Smart
@wakaleo
Andy
Palmer
Origins of the Journey Pattern in Serenity
Antony
Marcano
2007 2009 2012
Jan Molak
2015
John Smart
Serenity is cool
@wakaleo
Andy
Palmer
Origins of the Journey Pattern in Serenity
Antony
Marcano
2007 2009 2012
Jan Molak
2015
John Smart
Serenity is cool
But it needs the
Journey Pattern
@wakaleo
Andy
Palmer
Origins of the Journey Pattern in Serenity
Antony
Marcano
2007 2009 2012
Jan Molak
2015
John Smart
Serenity is cool
So let’s make it
happen!
But it needs the
Journey Pattern
@wakaleo
The Journey Pattern - A User-Centric model
Actors have goals
@wakaleo
The Journey Pattern - A User-Centric model
Actors have goals
Meet James
@wakaleo
The Journey Pattern - A User-Centric model
Actors have goals I’d like to be able to recall all
the things I need to do
Meet James
@wakaleo
The Journey Pattern - A User-Centric model
Actors have abilities
@wakaleo
The Journey Pattern - A User-Centric model
Actors have abilities I can browse the web with my
browser
@wakaleo
The Journey Pattern - A User-Centric model
Actors have abilities I can browse the web with my
browser
I can also query REST services
@wakaleo
I’d like to be able to recall all
the things I need to do
The Journey Pattern - A User-Centric model
Actors perform tasks
@wakaleo
I’d like to be able to recall all
the things I need to do
The Journey Pattern - A User-Centric model
Actors perform tasks
I’ll add ‘Buy some milk’ to my
todo list
@wakaleo
I’d like to be able to recall all
the things I need to do
The Journey Pattern - A User-Centric model
Actors may interact with the system to
perform these tasks
I’ll add ‘Buy some milk’ to my
todo list
@wakaleo
I’d like to be able to recall all
the things I need to do
The Journey Pattern - A User-Centric model
Actors may interact with the system to
perform these tasks
I’ll add ‘Buy some milk’ to my
todo list
@wakaleo
I’d like to be able to recall all
the things I need to do
The Journey Pattern - A User-Centric model
Actors may interact with the system to
perform these tasks
I’ll add ‘Buy some milk’ to my
todo list
Type ‘Buy the milk’
@wakaleo
I’d like to be able to recall all
the things I need to do
The Journey Pattern - A User-Centric model
Actors may interact with the system to
perform these tasks
I’ll add ‘Buy some milk’ to my
todo list
Type ‘Buy the milk’
@wakaleo
I’d like to be able to recall all
the things I need to do
The Journey Pattern - A User-Centric model
Actors may interact with the system to
perform these tasks
I’ll add ‘Buy some milk’ to my
todo list
Type ‘Buy the milk’
Press ‘ENTER’
@wakaleo
I’d like to be able to recall all
the things I need to do
The Journey Pattern - A User-Centric model
Actors may interact with the system to
perform these tasks
I’ll add ‘Buy some milk’ to my
todo list
Type ‘Buy the milk’
Press ‘ENTER’
@wakaleo
The Journey Pattern in Serenity
Actors have goals I’d like to be able to recall all
the things I need to do
@wakaleo
The Journey Pattern in Serenity
Actors have goals
Feature: Add new todos

James would like to be able to recall all the things he needs to do



Scenario: Record a new todo action for future use

Given James needs to buy some milk

When James adds the todo action 'Buy some milk'

Then 'Buy some milk' should be recorded in his todo list
I’d like to be able to recall all
the things I need to do
@wakaleo
A User-Centric model
Actors have abilities I can browse the web with my
browser
Actor james = Actor.named(“James");
@Managed

WebDriver hisBrowser;
…
james.can(BrowseTheWeb.with(hisBrowser));
@wakaleo
A User-Centric model
Actors perform tasks
@Steps

AddItem addATodoItem;
…
james.attemptsTo(addATodoItem.called("Buy some milk"));
@wakaleo
A User-Centric model
Actors perform tasks I’ll add ‘Buy some milk’ to my
todo list
@Steps

AddItem addATodoItem;
…
james.attemptsTo(addATodoItem.called("Buy some milk"));
@wakaleo
A User-Centric model
Actors perform tasks
@Steps

AddItem addATodoItem;
…
james.attemptsTo(addATodoItem.called("Buy some milk"));
actor.attemptsTo(

Enter.theValue(thingToDo).into(ToDoList.NEW_TODO_FIELD),

Hit.the(RETURN).keyIn(ToDoList.NEW_TODO_FIELD)

);
@wakaleo
A User-Centric model
Actors perform tasks I’ll add ‘Buy some milk’ to my
todo list
@Steps

AddItem addATodoItem;
…
james.attemptsTo(addATodoItem.called("Buy some milk"));
actor.attemptsTo(

Enter.theValue(thingToDo).into(ToDoList.NEW_TODO_FIELD),

Hit.the(RETURN).keyIn(ToDoList.NEW_TODO_FIELD)

);
@wakaleo
A User-Centric model
Actors perform tasks I’ll add ‘Buy some milk’ to my
todo list
@Steps

AddItem addATodoItem;
…
james.attemptsTo(addATodoItem.called("Buy some milk"));
actor.attemptsTo(

Enter.theValue(thingToDo).into(ToDoList.NEW_TODO_FIELD),

Hit.the(RETURN).keyIn(ToDoList.NEW_TODO_FIELD)

);
Type ‘Buy the milk’
@wakaleo
A User-Centric model
Actors perform tasks I’ll add ‘Buy some milk’ to my
todo list
@Steps

AddItem addATodoItem;
…
james.attemptsTo(addATodoItem.called("Buy some milk"));
actor.attemptsTo(

Enter.theValue(thingToDo).into(ToDoList.NEW_TODO_FIELD),

Hit.the(RETURN).keyIn(ToDoList.NEW_TODO_FIELD)

);
Type ‘Buy the milk’
Press ‘ENTER’
@wakaleo
Coding demo
@wakaleo
References
• http://www.serenity-bdd.info

• https://github.com/serenity-bdd/serenity-journey-demo

• http://bit.ly/rg-journey
@wakaleo
Questions?
John Ferguson Smart
john.smart@wakaleo.com
wakaleo
http://www.wakaleo.com
http://www.serenity-bdd.info

More Related Content

PPT
Java database connectivity
PPT
Java basic
PPT
Ionic Framework
PDF
Introduction to Java 11
PDF
Angular material
PPTX
Bdd and spec flow
PPTX
Introduction to React JS for beginners | Namespace IT
PDF
Karate - powerful and simple framework for REST API automation testing
Java database connectivity
Java basic
Ionic Framework
Introduction to Java 11
Angular material
Bdd and spec flow
Introduction to React JS for beginners | Namespace IT
Karate - powerful and simple framework for REST API automation testing

What's hot (20)

PPTX
Introduction to Bdd and cucumber
PDF
Introduction To Single Page Application
PDF
Swagger / Quick Start Guide
PPTX
React JS - A quick introduction tutorial
PDF
JPA and Hibernate
PDF
Cross Browser Testing Using LambdaTest | Edureka
PPTX
Automation - web testing with selenium
PDF
Cucumber ppt
PPT
Selenium
PPTX
android sqlite
PPTX
Introduction to Spring Boot
PDF
Android JetPack: easy navigation with the new Navigation Controller
PPTX
Test Automation and Selenium
PPTX
Introduction to java
PDF
Introduction to BDD with Cucumber for Java
PPTX
API Test Automation Using Karate (Anil Kumar Moka)
PDF
Reasons to use React Query
PPTX
Flux architecture
PPTX
core java
PPTX
Automated Test Framework with Cucumber
Introduction to Bdd and cucumber
Introduction To Single Page Application
Swagger / Quick Start Guide
React JS - A quick introduction tutorial
JPA and Hibernate
Cross Browser Testing Using LambdaTest | Edureka
Automation - web testing with selenium
Cucumber ppt
Selenium
android sqlite
Introduction to Spring Boot
Android JetPack: easy navigation with the new Navigation Controller
Test Automation and Selenium
Introduction to java
Introduction to BDD with Cucumber for Java
API Test Automation Using Karate (Anil Kumar Moka)
Reasons to use React Query
Flux architecture
core java
Automated Test Framework with Cucumber
Ad

Viewers also liked (20)

PPT
A journey beyond the page object pattern
PDF
BDD Anti-patterns
PDF
CukeUp 2016 Agile Product Planning Workshop
PDF
All the world's a stage – the next step in automated testing practices
PDF
Beyond Page Objects
PDF
BDD - Collaborate like you mean it!
PDF
BDD-Driven Microservices
PPTX
Refactoring page objects The Screenplay Pattern
PPTX
ScreenPlay Design Patterns for QA Automation
PDF
BDD in Action: Building Software Right and Building the Right Software
PDF
BDD Anti-patterns
PPTX
Better Page Object Handling with Loadable Component Pattern
PDF
Better Page Object Handling with Loadable Component Pattern
PDF
BDD: The unit test of the product owner
PDF
Page Objects Done Right - selenium conference 2014
PDF
Functional testing the_good_the_bad_and_the_ugly
PDF
It's Testing, Jim, but not as we know it - BDD for Testers
PDF
Serenity-BDD training
PDF
BDD in Action - Devoxx 2014
PDF
Building a Secure App with Google Polymer and Java / Spring
A journey beyond the page object pattern
BDD Anti-patterns
CukeUp 2016 Agile Product Planning Workshop
All the world's a stage – the next step in automated testing practices
Beyond Page Objects
BDD - Collaborate like you mean it!
BDD-Driven Microservices
Refactoring page objects The Screenplay Pattern
ScreenPlay Design Patterns for QA Automation
BDD in Action: Building Software Right and Building the Right Software
BDD Anti-patterns
Better Page Object Handling with Loadable Component Pattern
Better Page Object Handling with Loadable Component Pattern
BDD: The unit test of the product owner
Page Objects Done Right - selenium conference 2014
Functional testing the_good_the_bad_and_the_ugly
It's Testing, Jim, but not as we know it - BDD for Testers
Serenity-BDD training
BDD in Action - Devoxx 2014
Building a Secure App with Google Polymer and Java / Spring
Ad

Similar to Serenity and the Journey Pattern (20)

PDF
Serenity BDD - from executable specifications to living documentation
PDF
TestWorks Conf Serenity BDD in action - John Ferguson Smart
PPTX
Extending Workflow Foundation With Custom Activities
PPTX
From Waterfall to Agile - Six Months In
PDF
Integrating Quality into Portfolio Management, PMI Silicon Valley Chapter Din...
PPT
Acceptance Testing Driven Development, TDD
PPT
Road to agile: federal government case study
PPTX
Scaling Kanban in the Enterprise with GreenHopper
PDF
Integrating Quality into Portfolio Management
PDF
Dollars and dates are killing agile final
PDF
Dollars and Dates are Killing Agile
KEY
Essential practices and thinking tools for Agile Adoption
PPTX
Microsoft ALM Platform Overview
PDF
TLC2018 Thomas Haver: The Automation Firehose - Be Strategic and Tactical
PDF
Creating value using Agile Methods- Nanda Lankalapalli
PDF
How to Adopt Agile at Your Organization
PPTX
Requirements in Agile Projects (Brief Intro), by Razvan Radulian (RTPIIBA, 20...
PDF
SD West 2008: Call the requirements police, you've entered design!
PDF
A Product Manager's Guide for managing 0 to1 journey of a SAAS product
PDF
IBM Collaborative Lifecycle Management
Serenity BDD - from executable specifications to living documentation
TestWorks Conf Serenity BDD in action - John Ferguson Smart
Extending Workflow Foundation With Custom Activities
From Waterfall to Agile - Six Months In
Integrating Quality into Portfolio Management, PMI Silicon Valley Chapter Din...
Acceptance Testing Driven Development, TDD
Road to agile: federal government case study
Scaling Kanban in the Enterprise with GreenHopper
Integrating Quality into Portfolio Management
Dollars and dates are killing agile final
Dollars and Dates are Killing Agile
Essential practices and thinking tools for Agile Adoption
Microsoft ALM Platform Overview
TLC2018 Thomas Haver: The Automation Firehose - Be Strategic and Tactical
Creating value using Agile Methods- Nanda Lankalapalli
How to Adopt Agile at Your Organization
Requirements in Agile Projects (Brief Intro), by Razvan Radulian (RTPIIBA, 20...
SD West 2008: Call the requirements police, you've entered design!
A Product Manager's Guide for managing 0 to1 journey of a SAAS product
IBM Collaborative Lifecycle Management

More from John Ferguson Smart Limited (20)

PPTX
My Reading Specs - Refactoring Patterns for Gherkin Scenarios
PDF
Artisti e Condotierri - How can your team become artists of the 21st century ...
PDF
Engage! Bringing teams together to deliver software that makes a difference
PDF
BE A POD OF DOLPHINS, NOT A DANCING ELEPHANT
PDF
Sustainable Test Automation with Serenity BDD and Screenplay
PDF
Feature Mapping Workshop
PDF
Engage! Bringing teams together to deliver software that makes a difference
PDF
Beyond Given/When/Then - why diving into Cucumber is the wrong approach to ad...
PDF
Beyond Given/When/Then - why diving into Cucumber is the wrong approach to ad...
PDF
Shift left-devoxx-pl
PDF
Screenplay - Next generation automated acceptance testing
PDF
Cucumber and Spock Primer
PDF
BDD in Action - Automated Web Testing with WebDriver and Serenity
PDF
Its testing-jim-but-not-as-we-know-it-devoxx
PDF
BDD in Action - building software that matters
PDF
BDD in Action – principles, practices and real-world application
PDF
TDD and BDD in Java 8 - what's in it for me?
PDF
Continuous Integration 101
PDF
BDD: There's more to it than you think
PDF
Help! My Legacy Application is Unmaintainable!
My Reading Specs - Refactoring Patterns for Gherkin Scenarios
Artisti e Condotierri - How can your team become artists of the 21st century ...
Engage! Bringing teams together to deliver software that makes a difference
BE A POD OF DOLPHINS, NOT A DANCING ELEPHANT
Sustainable Test Automation with Serenity BDD and Screenplay
Feature Mapping Workshop
Engage! Bringing teams together to deliver software that makes a difference
Beyond Given/When/Then - why diving into Cucumber is the wrong approach to ad...
Beyond Given/When/Then - why diving into Cucumber is the wrong approach to ad...
Shift left-devoxx-pl
Screenplay - Next generation automated acceptance testing
Cucumber and Spock Primer
BDD in Action - Automated Web Testing with WebDriver and Serenity
Its testing-jim-but-not-as-we-know-it-devoxx
BDD in Action - building software that matters
BDD in Action – principles, practices and real-world application
TDD and BDD in Java 8 - what's in it for me?
Continuous Integration 101
BDD: There's more to it than you think
Help! My Legacy Application is Unmaintainable!

Recently uploaded (20)

PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
cuic standard and advanced reporting.pdf
PDF
Empathic Computing: Creating Shared Understanding
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Encapsulation theory and applications.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
cuic standard and advanced reporting.pdf
Empathic Computing: Creating Shared Understanding
The AUB Centre for AI in Media Proposal.docx
The Rise and Fall of 3GPP – Time for a Sabbatical?
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Encapsulation theory and applications.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
MIND Revenue Release Quarter 2 2025 Press Release
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Building Integrated photovoltaic BIPV_UPV.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Spectral efficient network and resource selection model in 5G networks
Encapsulation_ Review paper, used for researhc scholars
Mobile App Security Testing_ A Comprehensive Guide.pdf
Chapter 3 Spatial Domain Image Processing.pdf

Serenity and the Journey Pattern

  • 1. @wakaleo The evolution of automated testing practices Take me on a journey @wakaleo
  • 2. @wakaleo John Ferguson Smart Introductions “I help teams of smart people 
 learn to work together more efficiently, 
 to deliver better software faster”
  • 3. @wakaleo Test Automation Do it well, or don’t do it at all
  • 4. @wakaleo How much are your tests worth? Weekly cost vs weekly savings $0 $20,000 $40,000 $60,000 $80,000 $100,000 $120,000 $140,000 $160,000 $180,000 1/09/2015 1/10/2015 1/11/2015 1/12/2015 Test0suite0cost0vs0savings0(per0week) Cost0saved0par0week Test0suite0cost0per0week
  • 5. @wakaleo How much are your tests worth? Weekly cost vs weekly savings $0 $20,000 $40,000 $60,000 $80,000 $100,000 $120,000 $140,000 $160,000 $180,000 1/09/2015 1/10/2015 1/11/2015 1/12/2015 Test0suite0cost0vs0savings0(per0week) Cost0saved0par0week Test0suite0cost0per0week Team cost is constant
  • 6. @wakaleo How much are your tests worth? Weekly cost vs weekly savings $0 $20,000 $40,000 $60,000 $80,000 $100,000 $120,000 $140,000 $160,000 $180,000 1/09/2015 1/10/2015 1/11/2015 1/12/2015 Test0suite0cost0vs0savings0(per0week) Cost0saved0par0week Test0suite0cost0per0week Team cost is constant Time saved increases with the number of executed
  • 7. @wakaleo How much are your tests worth? $0 $200,000 $400,000 $600,000 $800,000 $1,000,000 $1,200,000 1/09/2015 1/10/2015 1/11/2015 1/12/2015 What0is0your0test0suite0worth? Test0suite0ROI Test0suite0cost Cumulated cost vs cumulated savings
  • 8. @wakaleo How much are your tests worth? $0 $200,000 $400,000 $600,000 $800,000 $1,000,000 $1,200,000 1/09/2015 1/10/2015 1/11/2015 1/12/2015 What0is0your0test0suite0worth? Test0suite0ROI Test0suite0cost Cumulated cost vs cumulated savings Cumulated value should increase faster than cumulated cost
  • 9. @wakaleo Now factor in high maintenance 40-60% Typical maintenance overhead for poorly-written test suites
  • 10. @wakaleo Now factor in high maintenance Number of tests Maintenanceoverhead
  • 11. @wakaleo Now factor in high maintenance Number of tests Maintenanceoverhead
  • 12. @wakaleo $0 $50,000 $100,000 $150,000 $200,000 $250,000 $300,000 $350,000 $400,000 $450,000 $500,000 1/09/2015 1/10/2015 1/11/2015 1/12/2015 1/01/2016 What0is0your0test0suite0worth? Test0suite0cost Test0suite0ROI Now factor in high maintenance High-maintenance costs reduce the number of tests a team can write
  • 13. @wakaleo $0 $50,000 $100,000 $150,000 $200,000 $250,000 $300,000 $350,000 $400,000 $450,000 $500,000 1/09/2015 1/10/2015 1/11/2015 1/12/2015 1/01/2016 What0is0your0test0suite0worth? Test0suite0cost Test0suite0ROI Now factor in high maintenance High-maintenance costs reduce the number of tests a team can write High maintenance costs can cause your test suite to lose value
  • 19. @wakaleo Separation of Concerns - Layers Goals Tasks Actions
  • 20. @wakaleo Separation of Concerns - Layers Goals Tasks Actions What are you trying to achieve?
  • 21. @wakaleo Separation of Concerns - Layers Goals Tasks Actions What are you trying to achieve? What do you need to do to achieve this goal?
  • 22. @wakaleo Separation of Concerns - Layers Goals Tasks Actions What are you trying to achieve? What do you need to do to achieve this goal? What interactions with the system do you need for each task?
  • 23. @wakaleo Separation of Concerns - Layers Scenario: Add a new todo entry on the todo home page
 Given I am on the Todo application home page
 When I enter 'Buy some milk' into the New Todo field
 And I press ENTER
 Then the todo list box should contain 'Buy some milk'
  • 24. @wakaleo Separation of Concerns - Layers Scenario: Record a new todo action for future use
 Given I need to buy some milk
 When I add the todo action 'Buy some milk'
 Then 'Buy some milk' should be recorded in my todo list
  • 25. @wakaleo Feature documentationDetailed feedbackHigh level feedback Communication and documentation
  • 26. @wakaleo Feature documentationDetailed feedbackHigh level feedback Communication and documentation
  • 27. @wakaleo Serenity BDD “Because life is too short to h a v e t o m a i n t a i n u g l y automated test suites”
  • 28. @wakaleo Living documentation Strong Selenium WebDriver support JUnit, Cucumber or JBehave A layered approach Serenity BDD
  • 29. @wakaleo The Serenity layered architecture Goals Tasks Interactions
  • 30. @wakaleo The Serenity layered architecture Goals Tasks Interactions Tests or scenarios
  • 31. @wakaleo The Serenity layered architecture Goals Tasks Interactions Tests or scenarios “Steps”
  • 32. @wakaleo The Serenity layered architecture Goals Tasks Interactions Tests or scenarios “Steps” Page Objects or other technical components
  • 33. @wakaleo The Serenity layered architecture Feature: Add new todos
 James needs to be able to jot down actions he needs to do as he thinks of them
 
 Scenario: Record a new todo action for future use
 Given James needs to buy some milk
 When James adds the todo action 'Buy some milk'
 Then 'Buy some milk' should be recorded in his todo list
  • 34. @wakaleo The Serenity layered architecture Feature: Add new todos
 James needs to be able to jot down actions he needs to do as he thinks of them
 
 Scenario: Record a new todo action for future use
 Given James needs to buy some milk
 When James adds the todo action 'Buy some milk'
 Then 'Buy some milk' should be recorded in his todo list A goal
  • 35. @wakaleo The Serenity layered architecture Feature: Add new todos
 James needs to be able to jot down actions he needs to do as he thinks of them
 
 Scenario: Record a new todo action for future use
 Given James needs to buy some milk
 When James adds the todo action 'Buy some milk'
 Then 'Buy some milk' should be recorded in his todo list A goal A task
  • 36. @wakaleo The Serenity layered architecture Feature: Add new todos
 James needs to be able to jot down actions he needs to do as he thinks of them
 
 Scenario: Record a new todo action for future use
 Given James needs to buy some milk
 When James adds the todo action 'Buy some milk'
 Then 'Buy some milk' should be recorded in his todo list A goal A task @Steps ATodoUser james;
 
 @When(“^(?:.*) (?:adds|has added) the todo action '(.*)'$")
 public void i_add_the_todo_action(String actionName) {
 james.adds_an_action_called(actionName);
 }
  • 37. @wakaleo The Serenity layered architecture Feature: Add new todos
 James needs to be able to jot down actions he needs to do as he thinks of them
 
 Scenario: Record a new todo action for future use
 Given James needs to buy some milk
 When James adds the todo action 'Buy some milk'
 Then 'Buy some milk' should be recorded in his todo list A goal A task @Steps ATodoUser james;
 
 @When(“^(?:.*) (?:adds|has added) the todo action '(.*)'$")
 public void i_add_the_todo_action(String actionName) {
 james.adds_an_action_called(actionName);
 } The task definition
  • 38. @wakaleo The Serenity layered architecture Feature: Add new todos
 James needs to be able to jot down actions he needs to do as he thinks of them
 
 Scenario: Record a new todo action for future use
 Given James needs to buy some milk
 When James adds the todo action 'Buy some milk'
 Then 'Buy some milk' should be recorded in his todo list A goal A task @Steps ATodoUser james;
 
 @When(“^(?:.*) (?:adds|has added) the todo action '(.*)'$")
 public void i_add_the_todo_action(String actionName) {
 james.adds_an_action_called(actionName);
 } The task definition TodoPage onTheTodoHomePage;
 
 @Step
 public void adds_an_action_called(String actionName) {
 onTheTodoHomePage.addAnActionCalled(actionName);
 }
  • 39. @wakaleo The Serenity layered architecture Feature: Add new todos
 James needs to be able to jot down actions he needs to do as he thinks of them
 
 Scenario: Record a new todo action for future use
 Given James needs to buy some milk
 When James adds the todo action 'Buy some milk'
 Then 'Buy some milk' should be recorded in his todo list A goal A task @Steps ATodoUser james;
 
 @When(“^(?:.*) (?:adds|has added) the todo action '(.*)'$")
 public void i_add_the_todo_action(String actionName) {
 james.adds_an_action_called(actionName);
 } The task definition TodoPage onTheTodoHomePage;
 
 @Step
 public void adds_an_action_called(String actionName) {
 onTheTodoHomePage.addAnActionCalled(actionName);
 } An interaction
  • 40. @wakaleo Serenity for Living Documentation Feature: Add new todos
 I need to be able to jot down actions I need to do as fast as I think of them
 
 Scenario: Record a new todo action for future use
 Given I need to buy some milk
 When I add the todo action 'Buy some milk'
 Then 'Buy some milk' should be recorded in my todo list
  • 41. @wakaleo Serenity for Living Documentation Feature: Add new todos
 I need to be able to jot down actions I need to do as fast as I think of them
 
 Scenario: Record a new todo action for future use
 Given I need to buy some milk
 When I add the todo action 'Buy some milk'
 Then 'Buy some milk' should be recorded in my todo list
  • 43. @wakaleo Hard to apply to Single Page Apps Need modifications to extend Multiple Responsibilities Bloat Page Objects considered harmful
  • 45. @wakaleo Highly readable style Encourages reuse and maintainable code Small, reusable interaction components User-centric The Journey Pattern
  • 46. @wakaleo Origins of the Journey Pattern in Serenity Antony Marcano 2007 * * Based on actual events
  • 47. @wakaleo Origins of the Journey Pattern in Serenity Antony Marcano “Page Objects kinda suck. Why not try this pattern instead?” Agile Alliance Functional Test Tools Workshop 2007 2007 * * Based on actual events
  • 48. @wakaleo Origins of the Journey Pattern in Serenity Antony Marcano 2007 2009 Andy Palmer
  • 49. @wakaleo Origins of the Journey Pattern in Serenity Antony Marcano 2007 2009 More people should know about this pattern Andy Palmer
  • 50. @wakaleo Origins of the Journey Pattern in Serenity Antony Marcano 2007 2009 More people should know about this pattern JNarrate Andy Palmer Let’s write a reference implementation!
  • 51. @wakaleo Origins of the Journey Pattern in Serenity Antony Marcano 2007 2009 “Coronation Street rocks 2012 Andy Palmer
  • 52. @wakaleo Origins of the Journey Pattern in Serenity Antony Marcano 2007 2009 “Coronation Street rocks 2012 Andy Palmer Eureka! “Soap Opera Personas”
  • 53. @wakaleo Andy Palmer Origins of the Journey Pattern in Serenity Antony Marcano 2007 2009 2012 Jan Molak
  • 54. @wakaleo Andy Palmer Origins of the Journey Pattern in Serenity Antony Marcano 2007 2009 2012 Jan Molak You should call this “The Journey Pattern”
  • 55. @wakaleo Andy Palmer Origins of the Journey Pattern in Serenity Antony Marcano 2007 2009 2012 Jan Molak You should call this “The Journey Pattern” Damn!
  • 56. @wakaleo Andy Palmer Origins of the Journey Pattern in Serenity Antony Marcano 2007 2009 2012 Jan Molak You should call this “The Journey Pattern” Damn! Why didn’t we think of that!
  • 57. @wakaleo Andy Palmer Origins of the Journey Pattern in Serenity Antony Marcano 2007 2009 2012 Jan Molak 2015 John Smart
  • 58. @wakaleo Andy Palmer Origins of the Journey Pattern in Serenity Antony Marcano 2007 2009 2012 Jan Molak 2015 John Smart Serenity is cool
  • 59. @wakaleo Andy Palmer Origins of the Journey Pattern in Serenity Antony Marcano 2007 2009 2012 Jan Molak 2015 John Smart Serenity is cool But it needs the Journey Pattern
  • 60. @wakaleo Andy Palmer Origins of the Journey Pattern in Serenity Antony Marcano 2007 2009 2012 Jan Molak 2015 John Smart Serenity is cool So let’s make it happen! But it needs the Journey Pattern
  • 61. @wakaleo The Journey Pattern - A User-Centric model Actors have goals
  • 62. @wakaleo The Journey Pattern - A User-Centric model Actors have goals Meet James
  • 63. @wakaleo The Journey Pattern - A User-Centric model Actors have goals I’d like to be able to recall all the things I need to do Meet James
  • 64. @wakaleo The Journey Pattern - A User-Centric model Actors have abilities
  • 65. @wakaleo The Journey Pattern - A User-Centric model Actors have abilities I can browse the web with my browser
  • 66. @wakaleo The Journey Pattern - A User-Centric model Actors have abilities I can browse the web with my browser I can also query REST services
  • 67. @wakaleo I’d like to be able to recall all the things I need to do The Journey Pattern - A User-Centric model Actors perform tasks
  • 68. @wakaleo I’d like to be able to recall all the things I need to do The Journey Pattern - A User-Centric model Actors perform tasks I’ll add ‘Buy some milk’ to my todo list
  • 69. @wakaleo I’d like to be able to recall all the things I need to do The Journey Pattern - A User-Centric model Actors may interact with the system to perform these tasks I’ll add ‘Buy some milk’ to my todo list
  • 70. @wakaleo I’d like to be able to recall all the things I need to do The Journey Pattern - A User-Centric model Actors may interact with the system to perform these tasks I’ll add ‘Buy some milk’ to my todo list
  • 71. @wakaleo I’d like to be able to recall all the things I need to do The Journey Pattern - A User-Centric model Actors may interact with the system to perform these tasks I’ll add ‘Buy some milk’ to my todo list Type ‘Buy the milk’
  • 72. @wakaleo I’d like to be able to recall all the things I need to do The Journey Pattern - A User-Centric model Actors may interact with the system to perform these tasks I’ll add ‘Buy some milk’ to my todo list Type ‘Buy the milk’
  • 73. @wakaleo I’d like to be able to recall all the things I need to do The Journey Pattern - A User-Centric model Actors may interact with the system to perform these tasks I’ll add ‘Buy some milk’ to my todo list Type ‘Buy the milk’ Press ‘ENTER’
  • 74. @wakaleo I’d like to be able to recall all the things I need to do The Journey Pattern - A User-Centric model Actors may interact with the system to perform these tasks I’ll add ‘Buy some milk’ to my todo list Type ‘Buy the milk’ Press ‘ENTER’
  • 75. @wakaleo The Journey Pattern in Serenity Actors have goals I’d like to be able to recall all the things I need to do
  • 76. @wakaleo The Journey Pattern in Serenity Actors have goals Feature: Add new todos
 James would like to be able to recall all the things he needs to do
 
 Scenario: Record a new todo action for future use
 Given James needs to buy some milk
 When James adds the todo action 'Buy some milk'
 Then 'Buy some milk' should be recorded in his todo list I’d like to be able to recall all the things I need to do
  • 77. @wakaleo A User-Centric model Actors have abilities I can browse the web with my browser Actor james = Actor.named(“James"); @Managed
 WebDriver hisBrowser; … james.can(BrowseTheWeb.with(hisBrowser));
  • 78. @wakaleo A User-Centric model Actors perform tasks @Steps
 AddItem addATodoItem; … james.attemptsTo(addATodoItem.called("Buy some milk"));
  • 79. @wakaleo A User-Centric model Actors perform tasks I’ll add ‘Buy some milk’ to my todo list @Steps
 AddItem addATodoItem; … james.attemptsTo(addATodoItem.called("Buy some milk"));
  • 80. @wakaleo A User-Centric model Actors perform tasks @Steps
 AddItem addATodoItem; … james.attemptsTo(addATodoItem.called("Buy some milk")); actor.attemptsTo(
 Enter.theValue(thingToDo).into(ToDoList.NEW_TODO_FIELD),
 Hit.the(RETURN).keyIn(ToDoList.NEW_TODO_FIELD)
 );
  • 81. @wakaleo A User-Centric model Actors perform tasks I’ll add ‘Buy some milk’ to my todo list @Steps
 AddItem addATodoItem; … james.attemptsTo(addATodoItem.called("Buy some milk")); actor.attemptsTo(
 Enter.theValue(thingToDo).into(ToDoList.NEW_TODO_FIELD),
 Hit.the(RETURN).keyIn(ToDoList.NEW_TODO_FIELD)
 );
  • 82. @wakaleo A User-Centric model Actors perform tasks I’ll add ‘Buy some milk’ to my todo list @Steps
 AddItem addATodoItem; … james.attemptsTo(addATodoItem.called("Buy some milk")); actor.attemptsTo(
 Enter.theValue(thingToDo).into(ToDoList.NEW_TODO_FIELD),
 Hit.the(RETURN).keyIn(ToDoList.NEW_TODO_FIELD)
 ); Type ‘Buy the milk’
  • 83. @wakaleo A User-Centric model Actors perform tasks I’ll add ‘Buy some milk’ to my todo list @Steps
 AddItem addATodoItem; … james.attemptsTo(addATodoItem.called("Buy some milk")); actor.attemptsTo(
 Enter.theValue(thingToDo).into(ToDoList.NEW_TODO_FIELD),
 Hit.the(RETURN).keyIn(ToDoList.NEW_TODO_FIELD)
 ); Type ‘Buy the milk’ Press ‘ENTER’