45
Acceptance Test Driven Development Michael Eselgroth Daryn Holmes

Acceptance Test Driven Development

  • Upload
    melina

  • View
    51

  • Download
    2

Embed Size (px)

DESCRIPTION

Acceptance Test Driven Development. Michael Eselgroth Daryn Holmes. Story Mapping. Story Mapping Demo. User Stories. As a … I want … So that …. Who?. What?. Why?. Who, what, why but not how…. Requirements. Stories are reminders for a future discussion - PowerPoint PPT Presentation

Citation preview

Page 1: Acceptance Test Driven Development

Acceptance Test Driven Development

Michael EselgrothDaryn Holmes

Page 2: Acceptance Test Driven Development
Page 3: Acceptance Test Driven Development
Page 4: Acceptance Test Driven Development
Page 5: Acceptance Test Driven Development

Story Mapping

Story Mapping Demo

Page 6: Acceptance Test Driven Development

User Stories

As a …

I want …

So that …

Who?

What?

Why?

Who, what, why but not how…

Page 7: Acceptance Test Driven Development

Requirements• Stories are reminders for a future discussion

• Drive out the requirements, in the form of examples• Specification by example• Preferably in a format that can be automatically executed

and verified

• Tools often use the following advertising: • “Business users can now write their own

requirements in their own language”

Page 8: Acceptance Test Driven Development

StoryHigh level requirement

May contain high level acceptance criteria

Specification by ExampleLow level requirements

Specific examples\scenarios of acceptance criteria

Example 1 Example 2 Example n

CodeIncludes unit testing and fleshing out the

scenarios\examples into complete automated acceptance tests

Page 9: Acceptance Test Driven Development

ATDD (BDD)

Page 10: Acceptance Test Driven Development

Anatomy of ATDD• System Under Test (SUT)• BDD Framework

– Runs examples\scenarios– Cucumber, Fitnsesse

• SUT Driver– Execute and drive the SUT– White, Selenium WebDriver

• Verification Framework– Built into Fitnesse– Unit Test verification– JUnit, Nunit, RSpec

Page 11: Acceptance Test Driven Development

FIT, Cucumber etc

Demo

Page 12: Acceptance Test Driven Development

Intelligent Testing

• No strict rules for all situations• Unit testing• Feature testing• Sensible slices• Somewhere in between

Page 13: Acceptance Test Driven Development

Smart Home

SUT

Smart Home Controller

Page 14: Acceptance Test Driven Development

Smart Home

Transmitter

Message Adapter

Business logic, database etc

Page 15: Acceptance Test Driven Development

Smart Home

‘Test’ Message Transmitter

Message Adaptor

Business logic, database etc

Page 16: Acceptance Test Driven Development

Smart Home

‘Test’ Message Transmitter

Message Adapter

Business logic, database etc

Page 17: Acceptance Test Driven Development

Smart Home

‘Test’ Message Transmitter

Message Adapter

Business logic, database etc

Page 18: Acceptance Test Driven Development

Smart Home

‘Test’ Message Transmitter

Message Adapter

Business logic, database etc

Message Adapter

Test Harness

Page 19: Acceptance Test Driven Development

Not Requested

Example: Automated Data Input

DatabaseBackground Application

(scheduled task)

Feed Provider

Content Team

Raw DataCalculated Data

Email

Page 20: Acceptance Test Driven Development

End To End Integration Test

DatabaseRepository WebHandler

EmailNotifier

Domain

Mocked

Mocked Moc

ked

Page 21: Acceptance Test Driven Development
Page 22: Acceptance Test Driven Development

What part do expert testers play

• They should do what they always done, just sooner and more often

• They should be embedded in the team• More opportunities for better tests if they are

on-board from the start

Page 23: Acceptance Test Driven Development

Why bother…

25 February 2011 Daryn Holmes

Page 24: Acceptance Test Driven Development

Why bother…

25 February 2011 Daryn Holmes

• On 10 June 1990, an improperly installed pain of the windshield failed

– Plane was at 17300 feet• No loss of life– 2 people were seriously injured

Page 25: Acceptance Test Driven Development

Why bother…

25 February 2011 Daryn Holmes

• A replacement windscreen had been installed 27 hours before the flight

• 90 bolts– 84 were 0.66mm too small in diameter– 6 were 2.5mm too short

• Previous windscreen has been fitted with the wrong bolts

Page 26: Acceptance Test Driven Development

Why bother…• Investigators found found fault with British Airways'

policies, which should have required testing or verification by another individual for this critical task

• They found engineers were working by themselves, under extreme pressure

• Safety recommendations – British Airways should review their quality

assurance system and encourage engineers to provide feedback

Page 27: Acceptance Test Driven Development

Why bother…

Page 28: Acceptance Test Driven Development

Really?

– ToEven• When a number is halfway between two others, it is

rounded toward the nearest even number– AwayFromZero• When a number is halfway between two others, it is

rounded toward the nearest number that is away from zero

Page 29: Acceptance Test Driven Development

What part do developers play

Develop Test Requirements(Spec)

Nr.

Of S

torie

s

Page 30: Acceptance Test Driven Development

What part do developers play

Develop Test Requirements(Spec)

Nr.

Of S

torie

s

Page 31: Acceptance Test Driven Development

What part do developers play

Develop Test Requirements(Spec)

Nr.

Of S

torie

s

Page 32: Acceptance Test Driven Development

What part do developers play

Develop Test Requirements(Spec)

Nr.

Of S

torie

s

Page 33: Acceptance Test Driven Development

What part do developers play

Develop Test Requirements(Spec)

Nr.

Of S

torie

s

Page 34: Acceptance Test Driven Development

Crystal: Efficiency is expendable in non-bottle-neck activities

Page 35: Acceptance Test Driven Development
Page 36: Acceptance Test Driven Development

Barry Boehm, “Equity Keynote Address” March 19, 2007.

Page 37: Acceptance Test Driven Development

Steve McConnell, Software Quality At Top Speed, 1996http://www.stevemcconnell.com/articles/art04.htm

As a rule of thumb, every hour you spend on defect prevention will reduce your repair time from three to ten hours

Page 38: Acceptance Test Driven Development

Should Start-ups Use TDD?

http://www.redhills.ie/2012/08/08/should-a-startup-use-tdd/

Page 39: Acceptance Test Driven Development

Should Start-ups Use TDD?

http://www.redhills.ie/2012/08/08/should-a-startup-use-tdd/

Page 40: Acceptance Test Driven Development
Page 41: Acceptance Test Driven Development

Introducing ATDD• At the start of a project• Introducing it on an existing project

• Outside in

Page 42: Acceptance Test Driven Development

TDD Culture

It’s not about the technology, it’s about the culture

Page 43: Acceptance Test Driven Development

TDD Culture“The development team is responsible

for first line support, 24/7”

- Steve Freeman

Page 44: Acceptance Test Driven Development

TDD Culture“The development team is responsible

for first line support, 24/7”

“Team members ended up volunteering to be on support over Christmas”

- Steve Freeman

Page 45: Acceptance Test Driven Development

Thank you…