88
Acceptance Test Driven Development (ATDD) Lean-Agile Acceptance Test-Driven Development ( Ken Pugh, 2011

Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Acceptance

Test Driven

Development

(ATDD)Lean-Agile Acceptance

Test-Driven Development (

Ken Pugh, 2011

Page 2: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

ATDD

Acceptance tests are

developed collaboratively

between the :

Customer

Developer

tester

Lean-Agile Acceptance Test-Driven Development (2011) Ken Pugh

Acceptance test driven development – involves developing

requirements tests prior to implementation

Chapter 2

Page 3: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

ATDD Lineage

ATDD comes from:

Example driven development (EDD)

Behavior-driven development (BDD)

Story-driven development (SDD)

Domain-driven Design (DDD)

Executable acceptance test-driven

development (EATDD)

Lean-Agile Acceptance Test-Driven Development (2011) Ken Pugh

Page 4: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Testing Strategy –

Chapter 3

Page 5: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Testing Matrix Chapter 3

Page 6: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Where

Tests

Run

Page 7: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Positive & Negative Testing

Positive testing – ensure the program works

as expected

Negative testing – check to see that

program does not create unexpected

results

Page 8: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Acceptance Testing –

Chapter 4

Page 9: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Requirements & Tests are

Linked

Tests clarify and amplify requirements

Can’t have a requirement without a test or

vice versa

Tests written after the code is written is a

new requirement or a new detail on an

existing requirement

Chapter 4

Page 10: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Requirement Examples

Examples of requirements clarify the

requirements and can be used as tests

Page 11: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Requirement Examples -

Example

Page 12: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Requirement Examples -

Example

Page 13: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Testing

Tests of business rules can be executed in at

least four ways:

1. Through the user interface of a

transaction that invokes the business rule

2. Development of a user interface that

directly invokes the business rule

3. Unit test implemented in a language’s

unit testing framework

4. Automated test that communicates with

the business rule module

Page 14: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Example project –

Chapter 5

Charter & Features

Charter objectives - project acceptance tests

Features (high level requirements) - feature acceptance criteria

Page 15: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

ATDD Process Chapter 5

Page 16: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

CharterVision - Describes the end-state of the result of the project, why

project should be done.

Mission - Path that will be taken to get to the vision.

Scope – boundaries of the project and key issues that the

project addresses (optional)

Deliverable – tangible outputs (optional)

Objectives - Measurable criteria for the success of the project

Principles - Statement of values that a team uses to inform

decision making.

Page 17: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

CharterVision - Describes the end-state of the result of the project, why project should be done.

Mission - Path that will be taken to get to the vision.

Scope – boundaries of the project and key issues that the project addresses (optional)

Deliverable – tangible outputs (optional)

Objectives - Measurable criteria for the success of the project -project acceptance tests

Principles - Statement of values that a team uses to inform decision making.

Page 18: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Objectives – Acceptance

Tests

Objectives must be visible by external observation

SMART :

Specific

Measureable

Achievable

Relevant

Time boxed

Page 19: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Video

store

rental

example

Page 20: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Releases

Possibly create mini-charters for each project release

Page 21: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

ATDD Process

Page 22: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

High Level Requirements

High level requirements or features

Create a list of possible features.

Select those that accomplish the objectives.

Estimate if the selected features can be implemented

to achieve the objectives.

If not, reevaluate the objectives.

Page 23: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Video Rentals Brain Storm

Page 24: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Features to Accomplish

Objectives

Page 25: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Feature Acceptance Criteria

Page 26: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Sequence & Schedule Features

Page 27: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

User Stories – Chapter 6

User stories - Story acceptance criteria

Page 28: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

ATDD Process

Page 29: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

User Stories Chapter 6

Break “features” into smaller “user stories” (also

called “requirement story”).

Only breakdown enough features to fill the

team’s time until the next feature breakdown.

Constraint stories also belong here .

Example – software must be developed using

open source software.

Page 30: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

User Story Process

While creating user stories , list one or more

acceptance criteria for each story

These acceptance criteria are expanded to

specific acceptance tests just before the story

is develop

Make stories brief. Details are gathered just

prior to, or during, the story’s implementation

Page 31: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Sprint PlanningEstimate the business value and effort for each

story – ratio gives a rough “Return On

Investment” (ROI) – use ROI to determine what

belongs in next sprintAs ROI flattens

may terminate

project for

other projects

with higher ROI

If iterations involve approximately

the same effort, the slope of the

business value curse is roughly the

ROI

Page 32: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

User Story Breakdowns

Break large stories into smaller – but business

value for a story is not achieved until all

needed stories are developed

Developer stories don’t give customer direct

value, but may be needed

Page 33: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Developer Stories

Some customer stories require framework development, translating to many developer stories. Example -development organization develops common modules or components

Developer stories add technical value and make it easier to track units of work

Acceptance criteria for these defined by the developers, not the customers

If considerable framework development is needed, - have an embedded technical project and a “technical product owner”, who can break a customer stories into technical customer stories, each with acceptance criteria, is needed

Page 34: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Roles

Role – “hats” people wear. One person can perform different roles.

Role attributes: Frequency of use

Domain expertiseComputer expertise

General goal

Can create “persona” for each role.

Persona – imaginary person described with lots of detail.

Page 35: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

User Stories

As a <role>, I want to <do something> so

that <reason>.

Want stories to satisfy INVEST

I – independent

N – negotiable

V – valuable

E – estimatable

S – small

T – testable

Page 36: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

User Stories

Page 37: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Story

Accept

ance

Criteria

Page 38: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Story Estimates

Estimates needed:

Business value – relative worth of a story

to the business

Effort - include all work required to deliver

the store including implementing the

code, testing it, and any other work

involved.

Page 39: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Business Value

Business value:

Increased revenue (sales, royalties, fees)

Decreased expenses

Using fewer resources

More efficient use of resources

Customer satisfaction

Product promoters/satisfiers/detractors

Staying in business

Avoiding risk

Page 40: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Estimating Business Value

Order the stories and assign values :

Fibonacci series (1, 2, 3, 5, 8, 13, …)

power of 2 (1, 2, 4, 8, …)

Page 41: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Collaborating on

Scenarios – Chapter 7

Use cases (scenarios) - acceptance tests

Page 42: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

ATDD Process

Page 43: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Use Case

Use case – describes a sequence of actions

and reactions between the user and the

software

Use cases can be highly details, fairly

lightweight, or anywhere in between

Don’t create use cases for stories until they are

needed, helping to avoid “analysis paralysis”

Page 44: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Sample Use Case

As the clerk, I want to check out a CD for a customer

so that I can keep track of who has rented it.

Page 45: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Use Case Template

Name – brief name given to user story

Description – can be the user story

Actor – almost always the role

Page 46: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Sample Use Case

As the clerk, I

want to check

out a CD for a

customer so

that I can keep

track of who

has rented it.

Page 47: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Sample Use Case - Exceptions

As the clerk, I want to check out a CD for a customer

so that I can keep track of who has rented it.

Page 48: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Sample Use Case - Alternatives

As the clerk, I want to check out a CD for a customer

so that I can keep track of who has rented it.

Page 49: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Sample Use Case - Tests

As the clerk, I want to check out a CD for a customer

so that I can keep track of who has rented it.

Outline acceptance tests – at least one for the main

course, each exception, and each alternative

Page 50: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Alternative Ways to Generate

Scenarios

Scenarios can be generated :

• Story map

• Conceptual flow

Page 51: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Story

Map

Page 52: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Conceptual Flow

Page 53: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Test Anatomy – Chapter 8

Finally the tests

Page 54: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

ATDD Process

Page 55: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Developing Tests

Customer, developer and tester develop tests together

Tester may envision extra tests

New tests may be discovered during implementation, but if this occurs frequently, the team can investigate the root cause of missing tests

Page 56: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Test Structure

Page 57: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Six Tests Similar Tests

Page 58: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Test Flow – Check Out CD

Page 59: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Sample

Test

Page 60: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Page 61: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Test CasesTest case is a test scenario with actual data.

Data can be placed in tables

Tables can be useful for expressing tests:. Three common types of tables:

Calculation

Data

Action

Page 62: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Calculation Table

Format:

? Indicates output

Examples

Page 63: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Data Table

Data tables can be used for input values or

expected values

Examples

Can include “data” in the name. If data

meets certain criteria, specify it after the

name

Page 64: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Action Table

First column: enter, press and check.

Examples

Page 65: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Use Tables or Not

Page 66: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Tests Needed

At least one test is needed for:

1. Every scenario (happy path)

2. Every alternate path

3. Every exception

more later….

Page 67: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Scenario Tests– Chapter 9

Page 68: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Cross-Story/Scenario Tests

Cross-Story – stories that have issues with other stories

Example:

Scenario for monitor that expects response from each disk each second or reports a failure

Scenario that turns a disk off if it isn’t accessed after 60 seconds.

Tests for each scenario may work, but need one or more tests for the interactions (integration testing)

Page 69: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Example – Late Rental & CD

Limit Reached

Page 70: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Multi-Level Tests

Run tests at multiple levels

Example – scenario that involves business

rules. Business rule tests are usually simpler

than UI tests (business rules don’t require

much setup). Test separately. Test business

rules, and later test UI.

Page 71: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

UI Tests

Create a working system early and test

against objectives. (Could create a

prototype.)

Page 72: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Alternate Interfaces

Page 73: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Tests Needed

At least one test is needed for:

1. Every scenario (happy path)

2. Every alternate path

3. Every exception

4. Cross story tests

5. Business rules (multi-level)

6. UI tests

Page 74: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

User Story Breakup –

Chapter 10

Page 75: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Boundary Conditions

Consider boundary conditions and if more

tests are needed.

Page 76: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

System Boundary –

Chapter 11

Page 77: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

External Interfaces

Page 78: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Credit Card Processor

Page 79: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Bank Transfer

Page 80: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Component Tests

Page 81: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Component Tests - continued

Page 82: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Component Tests - continued

Explore ways the credit card could be

denied and ask the customer what to do in

each case. Tests can be built for each.

Page 83: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Development Review –

Chapter 12

Page 84: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Workflow Tests

Need to test the entire workflow to make

sure there are no issues between related

stories and that the entire flow is usable.

Page 85: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Tests NeededAt least one test is needed for:

1. Every scenario (happy path)

2. Every alternate path

3. Every exception

4. Cross story tests

5. Business rules (multi-level)

6. UI tests

7. External interfaces

8. Component

9. Usability testing

10. Quality attribute testing

Page 86: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Revisit Chapter 1

Page 87: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Test Conditions (Chapter 1)

Tests should:

1. Fail for a well defined reason (the reason

the test was created)

2. No other test should fail for the same

reason, (otherwise you have a

redundant test)

3. A test should not fail for any other reason

Page 88: Acceptance Test Driven Development (ATDD) · ATDD Lineage ATDD comes from: Example driven development (EDD) Behavior-driven development (BDD) Story-driven development (SDD) Domain-driven

Test Doesn’t Fail for Other

Reasons

A test should not fail for any other reason –

hard to achieve.

Tests have setup, action/trigger and

expected result. A test may fail because the

setup did not work or the action/trigger did

not function properly.