how to deliver the right software (specification by example)

28
How to Deliver the Right Software Asier Barrenetxea

Upload: asier-barrenetxea

Post on 15-Aug-2015

86 views

Category:

Software


1 download

TRANSCRIPT

Page 1: How to Deliver the Right Software (Specification by example)

How to Deliver the Right

SoftwareAsier Barrenetxea

Page 2: How to Deliver the Right Software (Specification by example)

What is the single greatest cause of software failure?

Requirements!

Page 3: How to Deliver the Right Software (Specification by example)

Requirements

are wrong.

are badly written.

are incomplete.

The programmers and the specifiers understand the requirements differently.

Page 4: How to Deliver the Right Software (Specification by example)

Classical approach:testing at the end

Requirements

Development Testing

Page 5: How to Deliver the Right Software (Specification by example)

Hand over of requirements

Page 6: How to Deliver the Right Software (Specification by example)

Each source telling a different story

Tests ≃ Requirements

How system really works ≃ Requirements

Documentation get stale

Page 7: How to Deliver the Right Software (Specification by example)

Late feedback

Business misunderstands get arisen late on the process

When developer implementing requirements.

When qa testing it.

When software gets into production.

Big WASTE

Page 8: How to Deliver the Right Software (Specification by example)

Spec by example to the

rescue

Page 9: How to Deliver the Right Software (Specification by example)

Bring testing to the front

Requirements +

Testing

Development

Verification(automated)

Page 10: How to Deliver the Right Software (Specification by example)

Use examples

Easy to understand

Plain English

Unambiguous

Page 11: How to Deliver the Right Software (Specification by example)

Write examples collaboratively

Business people, developers and testers in the same room.

Transfer the knowledge.

Learn about the domain.

Ubiquitous language.

Early feedback of misunderstandings.

In 30 min meeting can find out things that it would take a whole iteration or even more.

everybody understands the same thing.

Page 12: How to Deliver the Right Software (Specification by example)

Write examples collaboratively

Inconsistencies and gaps are easy to spot when you write down the rules.

Find out incorrect assumptions.

Find out real business value.

Everybody gets this feeling of ownership.

Different approaches:

Three amigos

One developer with a stakeholder/domain expert

Whole team with stakeholders

Specification workshop

Page 13: How to Deliver the Right Software (Specification by example)

Specification workshop

For harder to specificy stories.

Meeting with 10+ people. POs, BAs, devs, QAs..

Bring people from other teams if necessary.

Create 3 teams and write examples in one board each.

Compare. Look for inconsistencies. Why do we have them?

Page 14: How to Deliver the Right Software (Specification by example)

Automate examples

Map examples to executable tests.

Use tools as Specflow, Cucumber, Fitness..

Do not modify examples when automating.

Page 15: How to Deliver the Right Software (Specification by example)

Automate examles

Brittle UI tests?

Do not couple your examples to the UI.

Page Objects https://code.google.com/p/selenium/wiki/PageObjects

Tests don’t have to go always through the UI!

Test pyramid. http://martinfowler.com/bliki/TestPyramid.html

Page 16: How to Deliver the Right Software (Specification by example)

Implement examples

Developers will have to code just what was specified.

Make the tests green -> Done.

Page 17: How to Deliver the Right Software (Specification by example)

Single source of truth

Examples = Requirements.

Examples = Automated tests.

Examples = What the system does.

Page 18: How to Deliver the Right Software (Specification by example)

Living documentation

Run examples with every change to the system.

Documentation never gets out-dated.

All tests green -> system is doing what examples say.

Page 19: How to Deliver the Right Software (Specification by example)

User stories

Relate examples with user story.

Gives context.

Focus on business goal.

As a <role>

I want <software feature>

In order to  <goal/desire> 

I order to <goal/desire> 

as a <role>

so that <software feature>

Page 20: How to Deliver the Right Software (Specification by example)

Gherkin syntax

Given -> arrange

When -> action

Then -> assert

Page 21: How to Deliver the Right Software (Specification by example)

What makes a good example

Focused on a single thing.

Self explanatory.

Uses the domain language.

SMART

Specific

Measurable

Achievable

Relevant

Time-bound.

Page 22: How to Deliver the Right Software (Specification by example)

Do not automate EVERYTHING

There would always be some manual testing.

Usability testing.

Exploratory testing.

Be aware.

Page 23: How to Deliver the Right Software (Specification by example)

Examples of examples

Page 24: How to Deliver the Right Software (Specification by example)
Page 25: How to Deliver the Right Software (Specification by example)

Conversation brings new scenarios to the table

Page 26: How to Deliver the Right Software (Specification by example)

Communication > Automation

The important thing is to communicate

Automation and tools are nice, but don’t get your main focus on them

“Individuals and interactions over processes and tools”

- Agile Manifesto

“I want to bridge the gap between business people and technical people”

- Kent Beck about XP

Page 27: How to Deliver the Right Software (Specification by example)

More Info + resources

Book. Specification by Example: How Successful Teams Deliver the Right Software , Gojko Adzichttp://www.amazon.co.uk/Specification-Example-Successful-Deliver-Software/dp/1617290084

Blog post. A.T. FAIL!, Robert C. Martinhttp://blog.8thlight.com/uncle-bob/2013/09/26/AT-FAIL.html

Specification by Example and Agile Acceptance Testing, Gojko Adzichttp://www.slideshare.net/gojkoadzic/specification-by-example-and-agile-acceptance-testing

My blog post.http://asierba.net/2014/04/03/spec-by-example/

Page 28: How to Deliver the Right Software (Specification by example)

Questions?