SlideShare uma empresa Scribd logo
1 de 35
ATDD and BDD
The Great “Beat Down” …
or “Debate”
Bob Galen
bob@rgalen.com
Mary Thorn
marythorn@gmail.com
Copyright © 2016 RGCG, LLC 2
Introduction
Bob Galen
 Independent Agile Coach (CEC) at RGCG, LLC
 Principle Agile Evangelist at Velocity Partners
 Somewhere ‘north’ of 30 years overall experience 
 Wide variety of technical stacks and business domains
 Developer first, then Project Management / Leadership, then
Testing
 Senior/Executive software development leadership for 20+ years
 Practicing formal agility since 2000
 XP, Lean, Scrum, and Kanban experience
 From Cary, North Carolina
Bias Disclaimer:
Agile is THE BEST Methodology
for Software Development…
However, NOT a Silver Bullet!
Introduction
Mary Thorn
 Mary Thorn is the Director of Quality at Ipreo in Raleigh,
NC
 Mary has a broad testing background that spans
automation, data warehouses, and web-based systems
in a wide variety of technologies and testing techniques.
 During her more than seventeen years of experience in
healthcare, HR, agriculture, and SaaS-based products,
 Mary has held manager and contributor level positions
in software development organizations.
 She has a strong interest in agile testing methodologies
and direct experience leading and coaching agile teams
through Scrum adoption & beyond.
 Mary is also the Chief Storyteller in the book “The
Three Pillars of Agile Quality & Testing”.
Copyright © 2016 RGCG, LLC 3
Copyright © 2016 RGCG, LLC
Bob: The Stories
4
Copyright © 2016 RGCG, LLC
User Story
Construct
As a <role>
I want <system behavior>
So that I realize <some business value>
**And can see that it does <example>
5
Copyright © 2016 RGCG, LLC
User Stories
 3 Parts of a story, 3-C’s
by Ron Jeffries
 Card
 Conversation
 Confirmation
 Cards are intentionally vague
or incomplete in order to
foster conversation and an
emergent solution
 Confirmation (Acceptance
Tests) are the specific things
required to consider the story
‘done’ or acceptable to our
customer
High 15
As traveler I want to
get directions between
two points, so I can
get to my destination
• Verify I can enter addresses in all 50 states
• Verify directions can cross state boundaries
• Verify that directions are with +/- 5% mileage of MapQuest
• Verify that addresses can be swapped for return
• Verify that invalid addresses are handled w/error message
6
Copyright © 2016 RGCG, LLC
Product Owner Role:
Card : Conversation : Confirmation
 Front of card – describes the
Story characteristics – flexible
format
 1-2 sentences; short and
succinct
 I’ve seen limits of 5 words per
Story
 Could be task-oriented, a
milestone, simple work,
virtually anything the team
needs to do
 Don’t get too hung up on
‘phrasing’
As a dog owner, I want to sign-up
for a kennel reservation over
Christmas so that I get a
confirmed spot
As the Google Map interface,
setup a mechanism for frequent
Travelers to save and share their
maps, so that they save time
7
Copyright © 2016 RGCG, LLC
Product Owner Role:
Card : Conversation : Confirmation
 Product Owner must participate in defining ‘doneness’ criteria for card(s)
 Completed with heavy tester input and buy-in from all team members
 Unlike Cards, confirmations are normally quite specific
 Confirmations document what must be demonstrated to complete the story
 Confirmations are synonymous with Acceptance Tests
 Should try to automate them, perhaps using FitNesse or Cucumber?
Verify individual as a registered pet owner
Verify that preferred members get 15% discount on basic service
Verify that preferred members get 25% discount on extended services
and reservation priority over other members
Verify that past Christmas customers get reservation priority
Verify that declines get email with discount coupon for future services
8
Copyright © 2016 RGCG, LLC
Product Owner Role:
Card : Conversation : Confirmation
 Product Owner must be available
for the emergent solution
conversations
 Critical point of influence in the
design / construction phase
 Conversations as a team are the
most important component of the
‘3Cs’
 Should also consider actual
customers or other customer
proxies in the process as
appropriate
Should we present
all the user
selections as radio
button groups?
Lets story board that and see
what it looks like!
Great idea! I can work
on the acceptance test
criteria in parallel!
9
Copyright © 2016 RGCG, LLC
Acceptance Tests
 Story: Customer
withdraws cash
 As a customer,
 I want to withdraw cash
from an ATM,
 so that I don’t have to wait
in line at the bank.
Do the acceptance test spur
questions or conversations?
Examples?
 Acceptance Tests:
 Verify that customer
authentication works
 Verify that the customer is
limited to 3 transactions in an
ATM session
 Verify that sufficient balance is
in place to support the
transaction
 Verify that overall transaction
workflow take no longer than 5
minutes
 Verify that the transaction is
immediately viewable in the
customers online access
10
Testing Does Not…
 Come from the Acceptance Criteria, they are
 Business facing
 Value focused
 Priority focused
 They help:
 The developers with design, coding, functional & non-functional
requirements
 The testers with test case development, risk-based testing
prioritization
 They are NOT the primary or only tests!!!
Copyright © 2016 RGCG, LLC 11
Stories come from…
 Product Owner (individual)
 Story Writing workshop(s) with team
 Backlog Refinement (Grooming)
Copyright © 2016 RGCG, LLC 12
Copyright © 2016 RGCG, LLC
3-Amigos
 Coined by George Dinwiddie
 http://rgalen.com/agile-training-news/2014/4/13/3-amigos-in-agile-teams
 Swarming around the User Story by:
 Developer(s)
 Tester(s)
 Product Owner
 Conversation device – reminder for collaboration
amongst relevant team members
13
3-Amigos
 Often takes the form of a:
 Feature team
 Story owner team
 Surrounding the life-cycle of a story from:
 Story inception
 Epic writing
 Via Backlog Refinement:
 Iterative - Feature/Theme decomposition (estimation-driven)
 Iterative - Story emergence – Ready?
Copyright © 2016 RGCG, LLC 14
Copyright © 2016 RGCG, LLC 15
Remember -- The Triad
Collaboration
Customer
Developer Tester
Ken Pugh has written a book
on ATDD and uses the
“Triad” to amplify this
collaborative pairing between
roles…Product Owner is
central to that!
Collaboration
FIRST…
Automation
SECOND…
The KEY to ATDD is…
 It drives:
 Conversation, Collaboration, and Communication
Around the story, around what to test, and around the
working code.
 Automation or executable acceptance tests are a second
level concern!!!
 Now, Mary it’s your turn…
Copyright © 2016 RGCG, LLC 16
Mary: The Automation
Copyright © 2016 RGCG, LLC 17
In a nutshell, automated
acceptance tests are executable
examples that define the
system's specifications.
Copyright © 2016 RGCG, LLC 18
What are Automated Acceptance Tests?
Acceptance Tests are:
 Formal examples that define requirements.
 Executable.
 Self-explanatory and readable by all team members.
 Tests of business rules.
 A living specification of system behavior.
Copyright © 2016 RGCG, LLC 19
What are Automated Acceptance Tests?
What are Automated Acceptance Tests?
Acceptance Tests do NOT
 Test pieces of code in isolation. They are not a substitute for unit
and integration tests.
 Verify the entire system.
 Verify all permutations of a piece of functionality.
 Use mock objects except to remove a dependency on an external
3rd party.
Copyright © 2016 RGCG, LLC 20
What are Automated Acceptance Tests?
Benefits:
 Higher quality b/c everyone shares the same understanding of the
requirements and builds it right the first time.
 Tests become the system's regression suite.
 Create an objective verification of “done-ness” for a story. A story is
done when all tests pass.
 Create transparency into progress on a story.
 Manual testers are part of the automation process.
 Allows for more exploratory testing b/c happy path is automated
Copyright © 2016 RGCG, LLC 21
Simple Example
Acceptance Criteria: Transactions are rounded to the
nearest cent.
Original Value Rounded Value
$0.021
$0.025
$0.029
$0.02
$0.02
$0.02
Copyright © 2016 RGCG, LLC 22
Simple Example
Why was there confusion?
The goal was missing...
Goal: Create a currency conversion system.
The Concrete Example clarified what was meant by the
acceptance criteria.
Refined Acceptance Criteria: Transactions are always
rounded down to the nearest cent.
Copyright © 2016 RGCG, LLC 23
Simple Example
 This simple example is a REAL EXAMPLE in a system
that was well-tested and approved by all parties.
 Attacker was able to steal > $15,000 starting with a
single cent using this process...
 $0.01 → 0.0051 € rounded to 0.01 €
 0.01 € → $0.0196 rounded to $0.02
 A seemingly minor ambiguity in the requirements was
very expensive.
Copyright © 2016 RGCG, LLC 24
Take Away’s
 Concrete examples drive understanding and
consensus.
 To create good representative examples, everyone
must understand the goal of the story.
 For technical people to properly understand the goal,
they must understand the business domain.
Copyright © 2016 RGCG, LLC 25
What does Cucumber have to
do with this?
Everything!!!
Copyright © 2016 RGCG, LLC 26
Ahhh…
The Automation
Cucumber
• Cucumber lets software development teams describe
how software should behave in plain text. The text is
written in a business-readable domain-specific
language and serves as documentation of
requirements, automated regression tests and
development-aid - all rolled into one format.
• Cucumber works with Ruby, Java, .NET, Flex or web
applications written in any language. It has been
translated to over 40 spoken languages.
Copyright © 2016 RGCG, LLC 27
Components:
• Cucumber (Framework)
• HTMLUnit (Browser Emulator)
• Selinium/Watir (Browser Emulator API)
• Features (Tests written in sentence format)
• Step Definitions (Backend code to support Features)
Automated Testing - Cucumber Framework
Copyright © 2016 RGCG, LLC 28
Automated Testing -Linking it all together
Command line –
Rake TAGS -
@abc
Cucumber
Framework - Tags
Feature File -
Sentence
Step Definition File –
Matching Sentence
Terminal
Result Output-
Browser Emulator Selinium/Watir –
Execute Command
Copyright © 2016 RGCG, LLC 29
Cucumber Feature Files
Keywords:
• Tests have reserved words that begin each line:
Given, When, Then, And, But.
• Use Given to state a precondition
• Use When & And when taking an action
• Use Then when asserting a validation
Scenario Outline: Verify Transactions are rounded to the nearest
cent.
Given I am on the order screen
When I make a transaction of 9.025
And save the transaction
Then the value should equal 9.02
Copyright © 2016 RGCG, LLC 30
Cucumber Example
@Cucumberpresentation
Feature: User would like to have a successful presentation
Tests the following acceptance criteria:
1. Verify the attendees are awake
2. Verify the attendees are happy with the presentation
@Attendeeawake
Scenario: Verify the attendees are awake
Given that I am an attendee
When I have drunk caffeine
Then I will be able to listen to the presenter
@Attendeeishappy
Scenario: Verify Attendees are happy
Given I am the presenter
When I talk slow
And my content is interesting
Then the attendees will be happy
Copyright © 2016 RGCG, LLC 31
The KEY to ATDD is…
 It drives:
 Executable Specifications, which drive conversation, but ALSO
code coverage, definitive examples, and Pass/Fail automation.
 Automation is the FIRST level concern!!!
Now, onto the Debate…
Copyright © 2016 RGCG, LLC 32
The KEY to ATDD is…
Copyright © 2016 RGCG, LLC 33
 Mary, what about the Story in the User Story?
 Bob, what about the promise of Product Owners writing
executable requirements?
 Bob, or the value of executable requirements?
 Mary, have you seen BDD miss the conversations?
Copyright © 2016 RGCG, LLC
Wrap-up
Final questions or discussion from attendees…
What do YOU think???
Thank you!
3434
Contact Info
Bob Galen
Principal Consultant,
RGalen Consulting Group, L.L.C.
Experience-driven agile focused training,
coaching & consulting
Cell: (919) 272-0719
bob@rgalen.com www.rgalen.com
bgalen@velocitypartners.net www.velocitypartners.net
Blogs
Project Times - http://www.projecttimes.com/robert-galen/
BA Times - http://www.batimes.com/robert-galen/
Podcast on all things ‘agile’ - http://www.meta-cast.com/
35Copyright © 2016 RGCG, LLC 35

Mais conteúdo relacionado

Mais procurados

Testing and DevOps Culture: Lessons Learned
Testing and DevOps Culture: Lessons LearnedTesting and DevOps Culture: Lessons Learned
Testing and DevOps Culture: Lessons Learned
LB Denker
 
Software Testing with Agile Requirements Practices
Software Testing with Agile Requirements Practices Software Testing with Agile Requirements Practices
Software Testing with Agile Requirements Practices
A B M Moniruzzaman
 
Improving the Quality of Incoming Code
Improving the Quality of Incoming CodeImproving the Quality of Incoming Code
Improving the Quality of Incoming Code
Naresh Jain
 

Mais procurados (20)

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
 
Design for Testability in Practice
Design for Testability in PracticeDesign for Testability in Practice
Design for Testability in Practice
 
A New Model for Testing
A New Model for TestingA New Model for Testing
A New Model for Testing
 
There's no time to test, can you just automate it? by Anna Heiermann
There's no time to test, can you just automate it? by Anna HeiermannThere's no time to test, can you just automate it? by Anna Heiermann
There's no time to test, can you just automate it? by Anna Heiermann
 
Justin Ison
Justin IsonJustin Ison
Justin Ison
 
Spec by-example
Spec by-exampleSpec by-example
Spec by-example
 
New model
New modelNew model
New model
 
Risk Mitigation Using Exploratory and Technical Testing | QASymphony Webinar
Risk Mitigation Using Exploratory and Technical Testing | QASymphony WebinarRisk Mitigation Using Exploratory and Technical Testing | QASymphony Webinar
Risk Mitigation Using Exploratory and Technical Testing | QASymphony Webinar
 
Hey You Got Your TDD in my SQL DB by Jeff McKenzie
Hey You Got Your TDD in my SQL DB by Jeff McKenzieHey You Got Your TDD in my SQL DB by Jeff McKenzie
Hey You Got Your TDD in my SQL DB by Jeff McKenzie
 
Testing and DevOps Culture: Lessons Learned
Testing and DevOps Culture: Lessons LearnedTesting and DevOps Culture: Lessons Learned
Testing and DevOps Culture: Lessons Learned
 
Closing the Requirements and Testing Loop Webinar
Closing the Requirements and Testing Loop WebinarClosing the Requirements and Testing Loop Webinar
Closing the Requirements and Testing Loop Webinar
 
Software Testing with Agile Requirements Practices
Software Testing with Agile Requirements Practices Software Testing with Agile Requirements Practices
Software Testing with Agile Requirements Practices
 
Continuous Testing - The New Normal
Continuous Testing - The New NormalContinuous Testing - The New Normal
Continuous Testing - The New Normal
 
Improving the Quality of Incoming Code
Improving the Quality of Incoming CodeImproving the Quality of Incoming Code
Improving the Quality of Incoming Code
 
The Future of Testing
The Future of TestingThe Future of Testing
The Future of Testing
 
Specification by example and agile acceptance testing
Specification by example and agile acceptance testingSpecification by example and agile acceptance testing
Specification by example and agile acceptance testing
 
How to Add Test Automation to your Quality Assurance Toolbelt
How to Add Test Automation to your Quality Assurance ToolbeltHow to Add Test Automation to your Quality Assurance Toolbelt
How to Add Test Automation to your Quality Assurance Toolbelt
 
Fundamental Principles of Software Development
Fundamental Principles of Software Development Fundamental Principles of Software Development
Fundamental Principles of Software Development
 
Exploratory Testing with JIRA | QASymphony Webinar
Exploratory Testing with JIRA | QASymphony WebinarExploratory Testing with JIRA | QASymphony Webinar
Exploratory Testing with JIRA | QASymphony Webinar
 
Using Stories to Test Requirements and Systems
Using Stories to Test Requirements and SystemsUsing Stories to Test Requirements and Systems
Using Stories to Test Requirements and Systems
 

Destaque

Emerging Trends in Testing - Conclusions from the 2013-2014 World Quality Report
Emerging Trends in Testing - Conclusions from the 2013-2014 World Quality ReportEmerging Trends in Testing - Conclusions from the 2013-2014 World Quality Report
Emerging Trends in Testing - Conclusions from the 2013-2014 World Quality Report
TEST Huddle
 

Destaque (11)

Lessons learnt Integrating Test into the Agile Lifecycle
Lessons learnt Integrating Test into the Agile LifecycleLessons learnt Integrating Test into the Agile Lifecycle
Lessons learnt Integrating Test into the Agile Lifecycle
 
A New Model For Testing
A New Model For TestingA New Model For Testing
A New Model For Testing
 
Thomas Axen - Lean Kaizen Applied To Software Testing - EuroSTAR 2010
Thomas Axen - Lean Kaizen Applied To Software Testing - EuroSTAR 2010Thomas Axen - Lean Kaizen Applied To Software Testing - EuroSTAR 2010
Thomas Axen - Lean Kaizen Applied To Software Testing - EuroSTAR 2010
 
Tester vs Developer
Tester vs DeveloperTester vs Developer
Tester vs Developer
 
Emerging Trends in Testing - Conclusions from the 2013-2014 World Quality Report
Emerging Trends in Testing - Conclusions from the 2013-2014 World Quality ReportEmerging Trends in Testing - Conclusions from the 2013-2014 World Quality Report
Emerging Trends in Testing - Conclusions from the 2013-2014 World Quality Report
 
The Core of Testing – Dynamic Testing Process – According to ISO 29119 with...
The Core of Testing  – Dynamic Testing Process –  According to ISO 29119 with...The Core of Testing  – Dynamic Testing Process –  According to ISO 29119 with...
The Core of Testing – Dynamic Testing Process – According to ISO 29119 with...
 
Fredrik Rydberg - Can Exploratory Testing Save Lives - EuroSTAR 2010
Fredrik Rydberg - Can Exploratory Testing Save Lives - EuroSTAR 2010Fredrik Rydberg - Can Exploratory Testing Save Lives - EuroSTAR 2010
Fredrik Rydberg - Can Exploratory Testing Save Lives - EuroSTAR 2010
 
Bram Bronneborg - Agile Testing Isn’t Risking It! - EuroSTAR 2012
Bram Bronneborg - Agile Testing Isn’t Risking It! - EuroSTAR 2012Bram Bronneborg - Agile Testing Isn’t Risking It! - EuroSTAR 2012
Bram Bronneborg - Agile Testing Isn’t Risking It! - EuroSTAR 2012
 
Anne Mette Hass - I Don't Want To Be A Tester Anymore - EuroSTAR 2010
Anne Mette Hass - I Don't Want To Be A Tester Anymore - EuroSTAR 2010Anne Mette Hass - I Don't Want To Be A Tester Anymore - EuroSTAR 2010
Anne Mette Hass - I Don't Want To Be A Tester Anymore - EuroSTAR 2010
 
"Experiences Of Test Automation At Spotify" with Kristian Karl
"Experiences Of Test Automation At Spotify" with Kristian Karl"Experiences Of Test Automation At Spotify" with Kristian Karl
"Experiences Of Test Automation At Spotify" with Kristian Karl
 
Why We Need Diversity in Testing- Accenture
Why We Need Diversity in Testing- AccentureWhy We Need Diversity in Testing- Accenture
Why We Need Diversity in Testing- Accenture
 

Semelhante a ATDD And BDD The Great Beat Down…or…Debate

Becoming an Effective Product Owner
Becoming an Effective Product OwnerBecoming an Effective Product Owner
Becoming an Effective Product Owner
Mike Cohn
 

Semelhante a ATDD And BDD The Great Beat Down…or…Debate (20)

Becoming an Effective Product Owner
Becoming an Effective Product OwnerBecoming an Effective Product Owner
Becoming an Effective Product Owner
 
Test Automation Strategies for the Agile World
Test Automation Strategies for the Agile WorldTest Automation Strategies for the Agile World
Test Automation Strategies for the Agile World
 
Seven Keys to Navigating Your Agile Testing Transition
Seven Keys to Navigating Your Agile Testing TransitionSeven Keys to Navigating Your Agile Testing Transition
Seven Keys to Navigating Your Agile Testing Transition
 
Writing Test Cases From User Stories And Acceptance Criteria
Writing Test Cases From User Stories And Acceptance CriteriaWriting Test Cases From User Stories And Acceptance Criteria
Writing Test Cases From User Stories And Acceptance Criteria
 
Bob Galen - Differentiating Ourselves & Demonstrating Value - EuroSTAR 2010
Bob Galen - Differentiating Ourselves & Demonstrating Value - EuroSTAR 2010Bob Galen - Differentiating Ourselves & Demonstrating Value - EuroSTAR 2010
Bob Galen - Differentiating Ourselves & Demonstrating Value - EuroSTAR 2010
 
The Tester's Role in Agile Planning
The Tester's Role in Agile PlanningThe Tester's Role in Agile Planning
The Tester's Role in Agile Planning
 
How to Ensure your Definition of Done is Well Done not Half-Baked
How to Ensure your Definition of Done is Well Done not Half-BakedHow to Ensure your Definition of Done is Well Done not Half-Baked
How to Ensure your Definition of Done is Well Done not Half-Baked
 
H/F University Presents: Growth Hacks - Rand Fishkin
H/F University Presents: Growth Hacks - Rand FishkinH/F University Presents: Growth Hacks - Rand Fishkin
H/F University Presents: Growth Hacks - Rand Fishkin
 
Conversion Conference 2011 NYC presentation
Conversion Conference 2011 NYC presentationConversion Conference 2011 NYC presentation
Conversion Conference 2011 NYC presentation
 
Xamariners - BDD + Mobile
Xamariners - BDD + MobileXamariners - BDD + Mobile
Xamariners - BDD + Mobile
 
A Testers Guide To Collaborating With Product Owners
A Testers Guide To Collaborating With Product OwnersA Testers Guide To Collaborating With Product Owners
A Testers Guide To Collaborating With Product Owners
 
Essential Patterns of Mature Agile Teams
Essential Patterns of Mature Agile TeamsEssential Patterns of Mature Agile Teams
Essential Patterns of Mature Agile Teams
 
Conversion optimization for startups
Conversion optimization for startupsConversion optimization for startups
Conversion optimization for startups
 
Top Software panies to Outsource.pdfTesting Com
Top Software panies to Outsource.pdfTesting ComTop Software panies to Outsource.pdfTesting Com
Top Software panies to Outsource.pdfTesting Com
 
Bundledarrows150 bit.ly/teamcaptainsmanagementcampsv
Bundledarrows150 bit.ly/teamcaptainsmanagementcampsvBundledarrows150 bit.ly/teamcaptainsmanagementcampsv
Bundledarrows150 bit.ly/teamcaptainsmanagementcampsv
 
A Dozen Keys to Agile Testing Maturity
A Dozen Keys to Agile Testing MaturityA Dozen Keys to Agile Testing Maturity
A Dozen Keys to Agile Testing Maturity
 
Seven Keys to Navigating Your Agile Testing Transition
Seven Keys to Navigating Your Agile Testing TransitionSeven Keys to Navigating Your Agile Testing Transition
Seven Keys to Navigating Your Agile Testing Transition
 
A Tester’s Guide to Collaborating with Product Owners
A Tester’s Guide to Collaborating with Product OwnersA Tester’s Guide to Collaborating with Product Owners
A Tester’s Guide to Collaborating with Product Owners
 
Workshop: Behavior Driven Development - Deliver value by Naveen Kumar Singh
Workshop: Behavior Driven Development - Deliver value by Naveen Kumar SinghWorkshop: Behavior Driven Development - Deliver value by Naveen Kumar Singh
Workshop: Behavior Driven Development - Deliver value by Naveen Kumar Singh
 
Trade-Offs & Prioritization in PM by Amazon Sr PM
Trade-Offs & Prioritization in PM by Amazon Sr PMTrade-Offs & Prioritization in PM by Amazon Sr PM
Trade-Offs & Prioritization in PM by Amazon Sr PM
 

Mais de TEST Huddle

Mais de TEST Huddle (20)

Keys to continuous testing for faster delivery euro star webinar
Keys to continuous testing for faster delivery euro star webinar Keys to continuous testing for faster delivery euro star webinar
Keys to continuous testing for faster delivery euro star webinar
 
Why you Shouldnt Automated But You Will Anyway
Why you Shouldnt Automated But You Will Anyway Why you Shouldnt Automated But You Will Anyway
Why you Shouldnt Automated But You Will Anyway
 
Being a Tester in Scrum
Being a Tester in ScrumBeing a Tester in Scrum
Being a Tester in Scrum
 
Leveraging Visual Testing with Your Functional Tests
Leveraging Visual Testing with Your Functional TestsLeveraging Visual Testing with Your Functional Tests
Leveraging Visual Testing with Your Functional Tests
 
Using Test Trees to get an Overview of Test Work
Using Test Trees to get an Overview of Test WorkUsing Test Trees to get an Overview of Test Work
Using Test Trees to get an Overview of Test Work
 
Big Data: The Magic to Attain New Heights
Big Data:  The Magic to Attain New HeightsBig Data:  The Magic to Attain New Heights
Big Data: The Magic to Attain New Heights
 
Will Robots Replace Testers?
Will Robots Replace Testers?Will Robots Replace Testers?
Will Robots Replace Testers?
 
TDD For The Rest Of Us
TDD For The Rest Of UsTDD For The Rest Of Us
TDD For The Rest Of Us
 
Scaling Agile with LeSS (Large Scale Scrum)
Scaling Agile with LeSS (Large Scale Scrum)Scaling Agile with LeSS (Large Scale Scrum)
Scaling Agile with LeSS (Large Scale Scrum)
 
Creating Agile Test Strategies for Larger Enterprises
Creating Agile Test Strategies for Larger EnterprisesCreating Agile Test Strategies for Larger Enterprises
Creating Agile Test Strategies for Larger Enterprises
 
Is There A Risk?
Is There A Risk?Is There A Risk?
Is There A Risk?
 
Are Your Tests Well-Travelled? Thoughts About Test Coverage
Are Your Tests Well-Travelled? Thoughts About Test CoverageAre Your Tests Well-Travelled? Thoughts About Test Coverage
Are Your Tests Well-Travelled? Thoughts About Test Coverage
 
Growing a Company Test Community: Roles and Paths for Testers
Growing a Company Test Community: Roles and Paths for TestersGrowing a Company Test Community: Roles and Paths for Testers
Growing a Company Test Community: Roles and Paths for Testers
 
Do we need testers on agile teams?
Do we need testers on agile teams?Do we need testers on agile teams?
Do we need testers on agile teams?
 
How to use selenium successfully
How to use selenium successfullyHow to use selenium successfully
How to use selenium successfully
 
Testers & Teams on the Agile Fluency™ Journey
Testers & Teams on the Agile Fluency™ Journey Testers & Teams on the Agile Fluency™ Journey
Testers & Teams on the Agile Fluency™ Journey
 
Practical Test Strategy Using Heuristics
Practical Test Strategy Using HeuristicsPractical Test Strategy Using Heuristics
Practical Test Strategy Using Heuristics
 
Thinking Through Your Role
Thinking Through Your RoleThinking Through Your Role
Thinking Through Your Role
 
Using Selenium 3 0
Using Selenium 3 0Using Selenium 3 0
Using Selenium 3 0
 
New Model Testing: A New Test Process and Tool
New Model Testing:  A New Test Process and ToolNew Model Testing:  A New Test Process and Tool
New Model Testing: A New Test Process and Tool
 

Último

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 

Último (20)

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 

ATDD And BDD The Great Beat Down…or…Debate

  • 1. ATDD and BDD The Great “Beat Down” … or “Debate” Bob Galen bob@rgalen.com Mary Thorn marythorn@gmail.com
  • 2. Copyright © 2016 RGCG, LLC 2 Introduction Bob Galen  Independent Agile Coach (CEC) at RGCG, LLC  Principle Agile Evangelist at Velocity Partners  Somewhere ‘north’ of 30 years overall experience   Wide variety of technical stacks and business domains  Developer first, then Project Management / Leadership, then Testing  Senior/Executive software development leadership for 20+ years  Practicing formal agility since 2000  XP, Lean, Scrum, and Kanban experience  From Cary, North Carolina Bias Disclaimer: Agile is THE BEST Methodology for Software Development… However, NOT a Silver Bullet!
  • 3. Introduction Mary Thorn  Mary Thorn is the Director of Quality at Ipreo in Raleigh, NC  Mary has a broad testing background that spans automation, data warehouses, and web-based systems in a wide variety of technologies and testing techniques.  During her more than seventeen years of experience in healthcare, HR, agriculture, and SaaS-based products,  Mary has held manager and contributor level positions in software development organizations.  She has a strong interest in agile testing methodologies and direct experience leading and coaching agile teams through Scrum adoption & beyond.  Mary is also the Chief Storyteller in the book “The Three Pillars of Agile Quality & Testing”. Copyright © 2016 RGCG, LLC 3
  • 4. Copyright © 2016 RGCG, LLC Bob: The Stories 4
  • 5. Copyright © 2016 RGCG, LLC User Story Construct As a <role> I want <system behavior> So that I realize <some business value> **And can see that it does <example> 5
  • 6. Copyright © 2016 RGCG, LLC User Stories  3 Parts of a story, 3-C’s by Ron Jeffries  Card  Conversation  Confirmation  Cards are intentionally vague or incomplete in order to foster conversation and an emergent solution  Confirmation (Acceptance Tests) are the specific things required to consider the story ‘done’ or acceptable to our customer High 15 As traveler I want to get directions between two points, so I can get to my destination • Verify I can enter addresses in all 50 states • Verify directions can cross state boundaries • Verify that directions are with +/- 5% mileage of MapQuest • Verify that addresses can be swapped for return • Verify that invalid addresses are handled w/error message 6
  • 7. Copyright © 2016 RGCG, LLC Product Owner Role: Card : Conversation : Confirmation  Front of card – describes the Story characteristics – flexible format  1-2 sentences; short and succinct  I’ve seen limits of 5 words per Story  Could be task-oriented, a milestone, simple work, virtually anything the team needs to do  Don’t get too hung up on ‘phrasing’ As a dog owner, I want to sign-up for a kennel reservation over Christmas so that I get a confirmed spot As the Google Map interface, setup a mechanism for frequent Travelers to save and share their maps, so that they save time 7
  • 8. Copyright © 2016 RGCG, LLC Product Owner Role: Card : Conversation : Confirmation  Product Owner must participate in defining ‘doneness’ criteria for card(s)  Completed with heavy tester input and buy-in from all team members  Unlike Cards, confirmations are normally quite specific  Confirmations document what must be demonstrated to complete the story  Confirmations are synonymous with Acceptance Tests  Should try to automate them, perhaps using FitNesse or Cucumber? Verify individual as a registered pet owner Verify that preferred members get 15% discount on basic service Verify that preferred members get 25% discount on extended services and reservation priority over other members Verify that past Christmas customers get reservation priority Verify that declines get email with discount coupon for future services 8
  • 9. Copyright © 2016 RGCG, LLC Product Owner Role: Card : Conversation : Confirmation  Product Owner must be available for the emergent solution conversations  Critical point of influence in the design / construction phase  Conversations as a team are the most important component of the ‘3Cs’  Should also consider actual customers or other customer proxies in the process as appropriate Should we present all the user selections as radio button groups? Lets story board that and see what it looks like! Great idea! I can work on the acceptance test criteria in parallel! 9
  • 10. Copyright © 2016 RGCG, LLC Acceptance Tests  Story: Customer withdraws cash  As a customer,  I want to withdraw cash from an ATM,  so that I don’t have to wait in line at the bank. Do the acceptance test spur questions or conversations? Examples?  Acceptance Tests:  Verify that customer authentication works  Verify that the customer is limited to 3 transactions in an ATM session  Verify that sufficient balance is in place to support the transaction  Verify that overall transaction workflow take no longer than 5 minutes  Verify that the transaction is immediately viewable in the customers online access 10
  • 11. Testing Does Not…  Come from the Acceptance Criteria, they are  Business facing  Value focused  Priority focused  They help:  The developers with design, coding, functional & non-functional requirements  The testers with test case development, risk-based testing prioritization  They are NOT the primary or only tests!!! Copyright © 2016 RGCG, LLC 11
  • 12. Stories come from…  Product Owner (individual)  Story Writing workshop(s) with team  Backlog Refinement (Grooming) Copyright © 2016 RGCG, LLC 12
  • 13. Copyright © 2016 RGCG, LLC 3-Amigos  Coined by George Dinwiddie  http://rgalen.com/agile-training-news/2014/4/13/3-amigos-in-agile-teams  Swarming around the User Story by:  Developer(s)  Tester(s)  Product Owner  Conversation device – reminder for collaboration amongst relevant team members 13
  • 14. 3-Amigos  Often takes the form of a:  Feature team  Story owner team  Surrounding the life-cycle of a story from:  Story inception  Epic writing  Via Backlog Refinement:  Iterative - Feature/Theme decomposition (estimation-driven)  Iterative - Story emergence – Ready? Copyright © 2016 RGCG, LLC 14
  • 15. Copyright © 2016 RGCG, LLC 15 Remember -- The Triad Collaboration Customer Developer Tester Ken Pugh has written a book on ATDD and uses the “Triad” to amplify this collaborative pairing between roles…Product Owner is central to that! Collaboration FIRST… Automation SECOND…
  • 16. The KEY to ATDD is…  It drives:  Conversation, Collaboration, and Communication Around the story, around what to test, and around the working code.  Automation or executable acceptance tests are a second level concern!!!  Now, Mary it’s your turn… Copyright © 2016 RGCG, LLC 16
  • 17. Mary: The Automation Copyright © 2016 RGCG, LLC 17
  • 18. In a nutshell, automated acceptance tests are executable examples that define the system's specifications. Copyright © 2016 RGCG, LLC 18 What are Automated Acceptance Tests?
  • 19. Acceptance Tests are:  Formal examples that define requirements.  Executable.  Self-explanatory and readable by all team members.  Tests of business rules.  A living specification of system behavior. Copyright © 2016 RGCG, LLC 19 What are Automated Acceptance Tests?
  • 20. What are Automated Acceptance Tests? Acceptance Tests do NOT  Test pieces of code in isolation. They are not a substitute for unit and integration tests.  Verify the entire system.  Verify all permutations of a piece of functionality.  Use mock objects except to remove a dependency on an external 3rd party. Copyright © 2016 RGCG, LLC 20
  • 21. What are Automated Acceptance Tests? Benefits:  Higher quality b/c everyone shares the same understanding of the requirements and builds it right the first time.  Tests become the system's regression suite.  Create an objective verification of “done-ness” for a story. A story is done when all tests pass.  Create transparency into progress on a story.  Manual testers are part of the automation process.  Allows for more exploratory testing b/c happy path is automated Copyright © 2016 RGCG, LLC 21
  • 22. Simple Example Acceptance Criteria: Transactions are rounded to the nearest cent. Original Value Rounded Value $0.021 $0.025 $0.029 $0.02 $0.02 $0.02 Copyright © 2016 RGCG, LLC 22
  • 23. Simple Example Why was there confusion? The goal was missing... Goal: Create a currency conversion system. The Concrete Example clarified what was meant by the acceptance criteria. Refined Acceptance Criteria: Transactions are always rounded down to the nearest cent. Copyright © 2016 RGCG, LLC 23
  • 24. Simple Example  This simple example is a REAL EXAMPLE in a system that was well-tested and approved by all parties.  Attacker was able to steal > $15,000 starting with a single cent using this process...  $0.01 → 0.0051 € rounded to 0.01 €  0.01 € → $0.0196 rounded to $0.02  A seemingly minor ambiguity in the requirements was very expensive. Copyright © 2016 RGCG, LLC 24
  • 25. Take Away’s  Concrete examples drive understanding and consensus.  To create good representative examples, everyone must understand the goal of the story.  For technical people to properly understand the goal, they must understand the business domain. Copyright © 2016 RGCG, LLC 25
  • 26. What does Cucumber have to do with this? Everything!!! Copyright © 2016 RGCG, LLC 26 Ahhh… The Automation
  • 27. Cucumber • Cucumber lets software development teams describe how software should behave in plain text. The text is written in a business-readable domain-specific language and serves as documentation of requirements, automated regression tests and development-aid - all rolled into one format. • Cucumber works with Ruby, Java, .NET, Flex or web applications written in any language. It has been translated to over 40 spoken languages. Copyright © 2016 RGCG, LLC 27
  • 28. Components: • Cucumber (Framework) • HTMLUnit (Browser Emulator) • Selinium/Watir (Browser Emulator API) • Features (Tests written in sentence format) • Step Definitions (Backend code to support Features) Automated Testing - Cucumber Framework Copyright © 2016 RGCG, LLC 28
  • 29. Automated Testing -Linking it all together Command line – Rake TAGS - @abc Cucumber Framework - Tags Feature File - Sentence Step Definition File – Matching Sentence Terminal Result Output- Browser Emulator Selinium/Watir – Execute Command Copyright © 2016 RGCG, LLC 29
  • 30. Cucumber Feature Files Keywords: • Tests have reserved words that begin each line: Given, When, Then, And, But. • Use Given to state a precondition • Use When & And when taking an action • Use Then when asserting a validation Scenario Outline: Verify Transactions are rounded to the nearest cent. Given I am on the order screen When I make a transaction of 9.025 And save the transaction Then the value should equal 9.02 Copyright © 2016 RGCG, LLC 30
  • 31. Cucumber Example @Cucumberpresentation Feature: User would like to have a successful presentation Tests the following acceptance criteria: 1. Verify the attendees are awake 2. Verify the attendees are happy with the presentation @Attendeeawake Scenario: Verify the attendees are awake Given that I am an attendee When I have drunk caffeine Then I will be able to listen to the presenter @Attendeeishappy Scenario: Verify Attendees are happy Given I am the presenter When I talk slow And my content is interesting Then the attendees will be happy Copyright © 2016 RGCG, LLC 31
  • 32. The KEY to ATDD is…  It drives:  Executable Specifications, which drive conversation, but ALSO code coverage, definitive examples, and Pass/Fail automation.  Automation is the FIRST level concern!!! Now, onto the Debate… Copyright © 2016 RGCG, LLC 32
  • 33. The KEY to ATDD is… Copyright © 2016 RGCG, LLC 33  Mary, what about the Story in the User Story?  Bob, what about the promise of Product Owners writing executable requirements?  Bob, or the value of executable requirements?  Mary, have you seen BDD miss the conversations?
  • 34. Copyright © 2016 RGCG, LLC Wrap-up Final questions or discussion from attendees… What do YOU think??? Thank you! 3434
  • 35. Contact Info Bob Galen Principal Consultant, RGalen Consulting Group, L.L.C. Experience-driven agile focused training, coaching & consulting Cell: (919) 272-0719 bob@rgalen.com www.rgalen.com bgalen@velocitypartners.net www.velocitypartners.net Blogs Project Times - http://www.projecttimes.com/robert-galen/ BA Times - http://www.batimes.com/robert-galen/ Podcast on all things ‘agile’ - http://www.meta-cast.com/ 35Copyright © 2016 RGCG, LLC 35