SlideShare a Scribd company logo
1 of 38
Download to read offline
Demo BDD in Action 
John Ferguson Smart 
Wakaleo Consulting
Miyamoto 
Musashi 
Japan 
1584 
– 
1645
Consultant 
Tr a i n e r 
Mentor 
Author 
Speaker 
Coder 
John Fer guson Smar t
What 
is 
BDD 
A 
typical 
BDD 
workflow 
What 
tools 
should 
I 
use? 
Effec@ve 
BDD 
automa@on 
BDD 
Gotchas
So what is this BDD thing? 
Using examples 
a shared understanding 
software that matters
Building the right software 
Hunting out value Automated Acceptance 
BDD 
Criteria 
API and code design 
Collaboration 
Living Documentation 
Building the software right
The business owner 
tells the business 
analyst what he wants 
1 
2 The business 
analyst writes a 
requirements 
document 
3 The developer 
translates the 
requirements 
into software 
4 The tester 
translates the 
requirements 
into test cases 5 The technical 
writer translates 
the software 
into functional 
and technical 
documentation 
BDD in a nutshell 
A traditional development process
The business owner 
and the business 
analyst have a 
conversation about 
what he needs. 
1 
2 
3 
The business analyst, 
the developer and the 
tester elaborate the 
requirements together. 
4 The tester uses 
these scenarios 
as the basis for 
her tests 
5 
The automated tests provide 
feedback on progress and help 
document the application 
The scenarios guide the 
developer and act as 
automated tests 
They define 
requirements as 
structured, English-language 
format 
"scenarios" 
•Specifica@ons 
are 
elaborated 
collabora@vely 
•Specifica@ons 
use 
a 
common 
language 
•Executable 
specifica@ons 
provide 
fast 
feedback
Benefits of BDD 
BDD 
BDD 
in 
the 
real 
world 
-­‐ 
an 
example
BDD Gotchas 
1 
2 
3 
An@-­‐paKern 
1 
The 
business 
analyst 
writes 
the 
scenarios 
4 
and 
then 
gives 
them 
to 
the 
other 
team 
members.
1 
2 
3 
BDD Gotchas 
An@-­‐paKern 
2 
4 
The 
tester 
writes 
the 
scenarios 
at 
the 
end 
to 
implement 
an 
automated 
test 
suite.
1 
2 
3 
4 
5 
BDD Gotchas 
An@-­‐paKern 
3 
The 
“Three 
Amigos” 
sessions 
don’t 
result 
in 
usable 
scenarios, 
so 
the 
developer 
invents 
them 
a=erwards.
1 
2 
3 
4 
5 
BDD Gotchas 
An@-­‐paKern 
4 
The 
scenarios 
are 
too 
UI-­‐centric 
or 
detail-­‐focused, 
and 
neglect 
to 
express 
the 
core 
business 
value.
BDD for high-level 
requirements
Frequent Flyer Application 
Goal: Encourage travellers to fly with Flying High airlines more often by allowing them to 
cumulate Frequent Flyer points that they can spend on cheaper flights. 
Goals 
Earning points 
from flights 
Capabili9es 
Earning points 
from spending 
with partners 
Viewing points 
earned 
Spending points 
on bookings 
Viewing current points balance Features 
View points needed to achieve 
the next status level 
Calculating points needed for 
a given destination
Calculating points needed for a given destination 
As a traveller 
I want to know how many points I need to go to a given destination 
So that I can plan my next trip with Flying High Airlines 
Feature 
Acceptance Criteria 
-Need 2 points per km 
-Members can calculate points needed on their account home page 
Acceptance 
Criteria 
Automated 
Acceptance 
Criteria
Automated 
Acceptance 
Criteria 
Automated 
Acceptance 
Tests
Automated 
Acceptance 
Tests 
Applica9on 
Code 
Low 
level 
specifica9ons
A typical BDD workflow 
“But 
what 
are 
the 
deliverables? 
Meaningful 
feedback 
on 
what 
requirements 
have 
(and 
have 
not) 
been 
delivered
An incremental approach 
“But 
what 
are 
the 
deliverables? 
Descrip9on 
of 
each 
feature 
with 
an 
example 
of 
how 
it 
behaves
An incremental approach 
“But 
what 
are 
the 
deliverables? 
…complete 
with 
illustra9ons
An incremental approach 
“But 
what 
are 
the 
deliverables? 
How 
was 
each 
feature 
tested?
An incremental approach 
“But 
what 
are 
the 
deliverables? 
Documenta9on 
about 
what 
you 
plan 
to 
deliver 
in 
each 
release
An incremental approach 
“But 
what 
are 
the 
deliverables? 
Useful 
low-­‐level 
technical 
documenta9on 
with 
liRle 
overhead
An incremental approach 
“But 
what 
are 
the 
deliverables? 
…and 
targeted 
automated 
regression 
tests
BDD for detailed coding
Business 
Goal 
Business 
Goal 
Business 
Goal 
“building the software right” 
FFeFeaeatatuturureresess FFeEeaxatatumurrepesless 
Low level 
speLcoifiwc aletvioenl s 
speLcoifiwc alteivoenls 
specifications 
Executable 
specifications 
We 
can 
automate 
these 
examples 
in 
the 
form 
of 
“executable 
specifica@ons”
Business 
Goal 
Business 
Goal 
Business 
Goal 
“building the software right” 
FFeFeaeatatuturureresess FFeEeaxatatumurrepesless 
Low level 
speLcoifiwc aletvioenl s 
speLcoifiwc alteivoenls 
specifications 
Executable 
specifications 
spock 
RSpec 
Low level 
specifications 
Low level 
specifications 
Low level 
specifications 
Low level 
specifications 
Low level 
specifications 
We 
use 
low-­‐level 
BDD 
or 
TDD 
tools 
to 
define 
the 
behavior 
of 
components, 
classes 
etc.
“building the software right” 
Acceptance 
criteria 
tell 
us 
what 
we 
need 
to 
build…
What 
would 
we 
like 
the 
API 
to 
look 
like? 
“building the software right”
“building the software right” 
Then 
write 
low-­‐level 
specifica@ons 
for 
the 
code
“building the software right” 
These 
low 
level 
specifica@ons 
become 
technical 
documenta@on 
for 
your 
APIs
What tool should I use?
Collaboration before Automation 
“Having 
the 
conversaDon 
is 
more 
important 
than 
recording 
the 
conversaDon 
is 
more 
important 
than 
automaDng 
the 
conversaDon” 
-­‐ 
Liz 
Keogh
Know your audience
DeThmanko You

More Related Content

What's hot

Automatisation des tests: le mythe du ROI
Automatisation des tests: le mythe du ROIAutomatisation des tests: le mythe du ROI
Automatisation des tests: le mythe du ROI
Gilles Mantel
 
Inverting The Testing Pyramid
Inverting The Testing PyramidInverting The Testing Pyramid
Inverting The Testing Pyramid
Naresh Jain
 
Coursera Digital Marketing Certificate
Coursera Digital Marketing CertificateCoursera Digital Marketing Certificate
Coursera Digital Marketing Certificate
Lucy Long
 

What's hot (15)

Arquitetura de Automação de Teste
Arquitetura de Automação de TesteArquitetura de Automação de Teste
Arquitetura de Automação de Teste
 
ОЛЕКСАНДР ХОТЕМСЬКИЙ «ChatGPT: який вплив буде мати на тестування?» Online Q...
ОЛЕКСАНДР ХОТЕМСЬКИЙ «ChatGPT: який вплив буде мати на тестування?»  Online Q...ОЛЕКСАНДР ХОТЕМСЬКИЙ «ChatGPT: який вплив буде мати на тестування?»  Online Q...
ОЛЕКСАНДР ХОТЕМСЬКИЙ «ChatGPT: який вплив буде мати на тестування?» Online Q...
 
10 P's of Testability
10 P's of Testability10 P's of Testability
10 P's of Testability
 
Introduction to BDD with Cucumber for Java
Introduction to BDD with Cucumber for JavaIntroduction to BDD with Cucumber for Java
Introduction to BDD with Cucumber for Java
 
Usando mind maps no planejamento de testes - TDC 2015
Usando mind maps no planejamento de testes - TDC 2015Usando mind maps no planejamento de testes - TDC 2015
Usando mind maps no planejamento de testes - TDC 2015
 
C++ 코드 품질 관리 비법
C++ 코드 품질 관리 비법C++ 코드 품질 관리 비법
C++ 코드 품질 관리 비법
 
JAWS-UG 金沢 | これだけ知っていれば LPWA
JAWS-UG 金沢 | これだけ知っていれば LPWAJAWS-UG 金沢 | これだけ知っていれば LPWA
JAWS-UG 金沢 | これだけ知っていれば LPWA
 
Behavior driven development (bdd)
Behavior driven development (bdd)Behavior driven development (bdd)
Behavior driven development (bdd)
 
Testing Conversational AI
Testing Conversational AITesting Conversational AI
Testing Conversational AI
 
Automatisation des tests: le mythe du ROI
Automatisation des tests: le mythe du ROIAutomatisation des tests: le mythe du ROI
Automatisation des tests: le mythe du ROI
 
Next-level collaboration: The future of content and design | Confab 2015
Next-level collaboration: The future of content and design | Confab 2015Next-level collaboration: The future of content and design | Confab 2015
Next-level collaboration: The future of content and design | Confab 2015
 
Inverting The Testing Pyramid
Inverting The Testing PyramidInverting The Testing Pyramid
Inverting The Testing Pyramid
 
TypeProf for IDE: Enrich Development Experience without Annotations
TypeProf for IDE: Enrich Development Experience without AnnotationsTypeProf for IDE: Enrich Development Experience without Annotations
TypeProf for IDE: Enrich Development Experience without Annotations
 
Coursera Digital Marketing Certificate
Coursera Digital Marketing CertificateCoursera Digital Marketing Certificate
Coursera Digital Marketing Certificate
 
提高轉換率 – 令人心動的行為召喚設計 Hpx life 45
提高轉換率 – 令人心動的行為召喚設計 Hpx life 45提高轉換率 – 令人心動的行為召喚設計 Hpx life 45
提高轉換率 – 令人心動的行為召喚設計 Hpx life 45
 

Viewers also liked

Testing requirements with BDD
Testing requirements with BDDTesting requirements with BDD
Testing requirements with BDD
Alan Parkinson
 

Viewers also liked (20)

BDD-Driven Microservices
BDD-Driven MicroservicesBDD-Driven Microservices
BDD-Driven Microservices
 
BDD Anti-patterns
BDD Anti-patternsBDD Anti-patterns
BDD Anti-patterns
 
Serenity BDD Workshop - 9th March 2016
Serenity BDD Workshop - 9th March 2016Serenity BDD Workshop - 9th March 2016
Serenity BDD Workshop - 9th March 2016
 
BDD in Action: Building Software Right and Building the Right Software
BDD in Action: Building Software Right and Building the Right SoftwareBDD in Action: Building Software Right and Building the Right Software
BDD in Action: Building Software Right and Building the Right Software
 
All the world's a stage – the next step in automated testing practices
All the world's a stage – the next step in automated testing practicesAll the world's a stage – the next step in automated testing practices
All the world's a stage – the next step in automated testing practices
 
BDD: The unit test of the product owner
BDD: The unit test of the product ownerBDD: The unit test of the product owner
BDD: The unit test of the product owner
 
It's Testing, Jim, but not as we know it - BDD for Testers
It's Testing, Jim, but not as we know it - BDD for TestersIt's Testing, Jim, but not as we know it - BDD for Testers
It's Testing, Jim, but not as we know it - BDD for Testers
 
Serenity-BDD training
Serenity-BDD trainingSerenity-BDD training
Serenity-BDD training
 
BDD in Action - Devoxx 2014
BDD in Action - Devoxx 2014BDD in Action - Devoxx 2014
BDD in Action - Devoxx 2014
 
CukeUp 2016 Agile Product Planning Workshop
CukeUp 2016 Agile Product Planning WorkshopCukeUp 2016 Agile Product Planning Workshop
CukeUp 2016 Agile Product Planning Workshop
 
BDD - Collaborate like you mean it!
BDD - Collaborate like you mean it!BDD - Collaborate like you mean it!
BDD - Collaborate like you mean it!
 
Serenity and the Journey Pattern
Serenity and the Journey PatternSerenity and the Journey Pattern
Serenity and the Journey Pattern
 
Beyond the Scrum Team: Delivering "Done" at Scale
Beyond the Scrum Team: Delivering "Done" at ScaleBeyond the Scrum Team: Delivering "Done" at Scale
Beyond the Scrum Team: Delivering "Done" at Scale
 
#abe15 From SAFe to Nexus the story of a mistake
#abe15 From SAFe to Nexus the story of a mistake#abe15 From SAFe to Nexus the story of a mistake
#abe15 From SAFe to Nexus the story of a mistake
 
Beyond Scrum of Scrums
Beyond Scrum of ScrumsBeyond Scrum of Scrums
Beyond Scrum of Scrums
 
Scaled Agile - PMI
Scaled Agile - PMIScaled Agile - PMI
Scaled Agile - PMI
 
Executable requirements: BDD with easyb and JDave
Executable requirements: BDD with easyb and JDaveExecutable requirements: BDD with easyb and JDave
Executable requirements: BDD with easyb and JDave
 
Testing requirements with BDD
Testing requirements with BDDTesting requirements with BDD
Testing requirements with BDD
 
Meet Scrum’s Big Brother, Dynamic Governance. Effectively Delivering Large Pr...
Meet Scrum’s Big Brother, Dynamic Governance. Effectively Delivering Large Pr...Meet Scrum’s Big Brother, Dynamic Governance. Effectively Delivering Large Pr...
Meet Scrum’s Big Brother, Dynamic Governance. Effectively Delivering Large Pr...
 
Scaling Agile Data Warehousing with the Scaled Agile Framework (SAFe)
Scaling Agile Data Warehousing with the Scaled Agile Framework (SAFe)Scaling Agile Data Warehousing with the Scaled Agile Framework (SAFe)
Scaling Agile Data Warehousing with the Scaled Agile Framework (SAFe)
 

Similar to BDD in Action - Automated Web Testing with WebDriver and Serenity

CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWD
Vikas Sarin
 
Code Review
Code ReviewCode Review
Code Review
Ravi Raj
 

Similar to BDD in Action - Automated Web Testing with WebDriver and Serenity (20)

BDD in Action - building software that matters
BDD in Action - building software that mattersBDD in Action - building software that matters
BDD in Action - building software that matters
 
Testing stage. being ahead business with cucumber
Testing stage. being ahead business with cucumberTesting stage. being ahead business with cucumber
Testing stage. being ahead business with cucumber
 
Expo qa from user stories to automated acceptance tests with bdd
Expo qa   from user stories to automated acceptance tests with bddExpo qa   from user stories to automated acceptance tests with bdd
Expo qa from user stories to automated acceptance tests with bdd
 
Webinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
Webinar-From user stories to automated acceptance tests with BDD-Eduardo RiolWebinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
Webinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
 
How Custom is your Org? CEER at Dreamforce 2019
How Custom is your Org?  CEER at Dreamforce 2019How Custom is your Org?  CEER at Dreamforce 2019
How Custom is your Org? CEER at Dreamforce 2019
 
CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWD
 
Five Phases of SAP Internships - Wizcore
Five Phases of SAP Internships - Wizcore Five Phases of SAP Internships - Wizcore
Five Phases of SAP Internships - Wizcore
 
Learn to see, measure and automate with value stream management
Learn to see, measure and automate with value stream managementLearn to see, measure and automate with value stream management
Learn to see, measure and automate with value stream management
 
DevOps Deconstructed
DevOps DeconstructedDevOps Deconstructed
DevOps Deconstructed
 
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
 
Matteo bordin tqs_2014_web
Matteo bordin tqs_2014_webMatteo bordin tqs_2014_web
Matteo bordin tqs_2014_web
 
Business value through requirements
Business value through requirementsBusiness value through requirements
Business value through requirements
 
Build the Right Regression Suite with Behavior-Driven Testing
Build the Right Regression Suite with Behavior-Driven TestingBuild the Right Regression Suite with Behavior-Driven Testing
Build the Right Regression Suite with Behavior-Driven Testing
 
erp manager certification
erp manager certificationerp manager certification
erp manager certification
 
Spectacular Specs and how to write them!
Spectacular Specs and how to write them!Spectacular Specs and how to write them!
Spectacular Specs and how to write them!
 
How to run an Enterprise PHP Shop
How to run an Enterprise PHP ShopHow to run an Enterprise PHP Shop
How to run an Enterprise PHP Shop
 
Introduction to QPR ScoreCard 8 & Iycon
Introduction to QPR ScoreCard 8 & IyconIntroduction to QPR ScoreCard 8 & Iycon
Introduction to QPR ScoreCard 8 & Iycon
 
Code Review
Code ReviewCode Review
Code Review
 
apidays Helsinki & North 2023 - How can data-driven DevRel help identify gaps...
apidays Helsinki & North 2023 - How can data-driven DevRel help identify gaps...apidays Helsinki & North 2023 - How can data-driven DevRel help identify gaps...
apidays Helsinki & North 2023 - How can data-driven DevRel help identify gaps...
 
PHP CE 2018 - Building Symfony application with Ports and Adapters approach a...
PHP CE 2018 - Building Symfony application with Ports and Adapters approach a...PHP CE 2018 - Building Symfony application with Ports and Adapters approach a...
PHP CE 2018 - Building Symfony application with Ports and Adapters approach a...
 

More from John Ferguson Smart Limited

More from John Ferguson Smart Limited (15)

My Reading Specs - Refactoring Patterns for Gherkin Scenarios
My Reading Specs - Refactoring Patterns for Gherkin ScenariosMy Reading Specs - Refactoring Patterns for Gherkin Scenarios
My Reading Specs - Refactoring Patterns for Gherkin Scenarios
 
Artisti e Condotierri - How can your team become artists of the 21st century ...
Artisti e Condotierri - How can your team become artists of the 21st century ...Artisti e Condotierri - How can your team become artists of the 21st century ...
Artisti e Condotierri - How can your team become artists of the 21st century ...
 
Engage! Bringing teams together to deliver software that makes a difference
Engage! Bringing teams together to deliver software that makes a differenceEngage! Bringing teams together to deliver software that makes a difference
Engage! Bringing teams together to deliver software that makes a difference
 
BE A POD OF DOLPHINS, NOT A DANCING ELEPHANT
BE A POD OF DOLPHINS, NOT A DANCING ELEPHANTBE A POD OF DOLPHINS, NOT A DANCING ELEPHANT
BE A POD OF DOLPHINS, NOT A DANCING ELEPHANT
 
Sustainable Test Automation with Serenity BDD and Screenplay
Sustainable Test Automation with Serenity BDD and ScreenplaySustainable Test Automation with Serenity BDD and Screenplay
Sustainable Test Automation with Serenity BDD and Screenplay
 
Engage! Bringing teams together to deliver software that makes a difference
Engage! Bringing teams together to deliver software that makes a differenceEngage! Bringing teams together to deliver software that makes a difference
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...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
Shift left-devoxx-plShift left-devoxx-pl
Shift left-devoxx-pl
 
Screenplay - Next generation automated acceptance testing
Screenplay - Next generation automated acceptance testingScreenplay - Next generation automated acceptance testing
Screenplay - Next generation automated acceptance testing
 
Cucumber and Spock Primer
Cucumber and Spock PrimerCucumber and Spock Primer
Cucumber and Spock Primer
 
Its testing-jim-but-not-as-we-know-it-devoxx
Its testing-jim-but-not-as-we-know-it-devoxxIts testing-jim-but-not-as-we-know-it-devoxx
Its testing-jim-but-not-as-we-know-it-devoxx
 
TDD and BDD in Java 8 - what's in it for me?
TDD and BDD in Java 8 - what's in it for me?TDD and BDD in Java 8 - what's in it for me?
TDD and BDD in Java 8 - what's in it for me?
 
Continuous Integration 101
Continuous Integration 101Continuous Integration 101
Continuous Integration 101
 
BDD: There's more to it than you think
BDD: There's more to it than you thinkBDD: There's more to it than you think
BDD: There's more to it than you think
 
Help! My Legacy Application is Unmaintainable!
Help! My Legacy Application is Unmaintainable!Help! My Legacy Application is Unmaintainable!
Help! My Legacy Application is Unmaintainable!
 

Recently uploaded

Recently uploaded (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

BDD in Action - Automated Web Testing with WebDriver and Serenity

  • 1. Demo BDD in Action John Ferguson Smart Wakaleo Consulting
  • 2. Miyamoto Musashi Japan 1584 – 1645
  • 3. Consultant Tr a i n e r Mentor Author Speaker Coder John Fer guson Smar t
  • 4. What is BDD A typical BDD workflow What tools should I use? Effec@ve BDD automa@on BDD Gotchas
  • 5. So what is this BDD thing? Using examples a shared understanding software that matters
  • 6. Building the right software Hunting out value Automated Acceptance BDD Criteria API and code design Collaboration Living Documentation Building the software right
  • 7. The business owner tells the business analyst what he wants 1 2 The business analyst writes a requirements document 3 The developer translates the requirements into software 4 The tester translates the requirements into test cases 5 The technical writer translates the software into functional and technical documentation BDD in a nutshell A traditional development process
  • 8. The business owner and the business analyst have a conversation about what he needs. 1 2 3 The business analyst, the developer and the tester elaborate the requirements together. 4 The tester uses these scenarios as the basis for her tests 5 The automated tests provide feedback on progress and help document the application The scenarios guide the developer and act as automated tests They define requirements as structured, English-language format "scenarios" •Specifica@ons are elaborated collabora@vely •Specifica@ons use a common language •Executable specifica@ons provide fast feedback
  • 9. Benefits of BDD BDD BDD in the real world -­‐ an example
  • 10. BDD Gotchas 1 2 3 An@-­‐paKern 1 The business analyst writes the scenarios 4 and then gives them to the other team members.
  • 11. 1 2 3 BDD Gotchas An@-­‐paKern 2 4 The tester writes the scenarios at the end to implement an automated test suite.
  • 12. 1 2 3 4 5 BDD Gotchas An@-­‐paKern 3 The “Three Amigos” sessions don’t result in usable scenarios, so the developer invents them a=erwards.
  • 13. 1 2 3 4 5 BDD Gotchas An@-­‐paKern 4 The scenarios are too UI-­‐centric or detail-­‐focused, and neglect to express the core business value.
  • 14. BDD for high-level requirements
  • 15.
  • 16.
  • 17. Frequent Flyer Application Goal: Encourage travellers to fly with Flying High airlines more often by allowing them to cumulate Frequent Flyer points that they can spend on cheaper flights. Goals Earning points from flights Capabili9es Earning points from spending with partners Viewing points earned Spending points on bookings Viewing current points balance Features View points needed to achieve the next status level Calculating points needed for a given destination
  • 18. Calculating points needed for a given destination As a traveller I want to know how many points I need to go to a given destination So that I can plan my next trip with Flying High Airlines Feature Acceptance Criteria -Need 2 points per km -Members can calculate points needed on their account home page Acceptance Criteria Automated Acceptance Criteria
  • 19. Automated Acceptance Criteria Automated Acceptance Tests
  • 20. Automated Acceptance Tests Applica9on Code Low level specifica9ons
  • 21. A typical BDD workflow “But what are the deliverables? Meaningful feedback on what requirements have (and have not) been delivered
  • 22. An incremental approach “But what are the deliverables? Descrip9on of each feature with an example of how it behaves
  • 23. An incremental approach “But what are the deliverables? …complete with illustra9ons
  • 24. An incremental approach “But what are the deliverables? How was each feature tested?
  • 25. An incremental approach “But what are the deliverables? Documenta9on about what you plan to deliver in each release
  • 26. An incremental approach “But what are the deliverables? Useful low-­‐level technical documenta9on with liRle overhead
  • 27. An incremental approach “But what are the deliverables? …and targeted automated regression tests
  • 29. Business Goal Business Goal Business Goal “building the software right” FFeFeaeatatuturureresess FFeEeaxatatumurrepesless Low level speLcoifiwc aletvioenl s speLcoifiwc alteivoenls specifications Executable specifications We can automate these examples in the form of “executable specifica@ons”
  • 30. Business Goal Business Goal Business Goal “building the software right” FFeFeaeatatuturureresess FFeEeaxatatumurrepesless Low level speLcoifiwc aletvioenl s speLcoifiwc alteivoenls specifications Executable specifications spock RSpec Low level specifications Low level specifications Low level specifications Low level specifications Low level specifications We use low-­‐level BDD or TDD tools to define the behavior of components, classes etc.
  • 31. “building the software right” Acceptance criteria tell us what we need to build…
  • 32. What would we like the API to look like? “building the software right”
  • 33. “building the software right” Then write low-­‐level specifica@ons for the code
  • 34. “building the software right” These low level specifica@ons become technical documenta@on for your APIs
  • 36. Collaboration before Automation “Having the conversaDon is more important than recording the conversaDon is more important than automaDng the conversaDon” -­‐ Liz Keogh