persona driven development - agile alliance · 2019. 12. 16. · acceptance test driven development...

44
© copyright Tim Andersen, 2010. All rights reserved. Persona Driven Development Tim Andersen

Upload: others

Post on 23-Sep-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Persona Driven Development

Tim Andersen

Page 2: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Full-Time Developer

Page 3: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

• Established 1979

• Private, Non-profit corporation

Page 4: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Mission: To help Iowa students and families obtain the resources necessary to succeed in postsecondary education

Page 5: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Page 6: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Overview

• Acceptance testing with FitNesse

• Common problems with Acceptance Tests

• Getting the business to care about acceptance tests

• Using Personas to augment communication

• Combining personas with acceptance tests

Page 7: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Types of TestsLevel of

Abstraction Purpose Tool

Unit Tests low breadth JUnit

Acceptance Tests high depth FitNesse

Page 8: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Unit Test

• Small, focused purpose (micro tests)

• Tests one thing

• Technical/Implementation focused

• By programmers, for programmers

Page 9: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Three Laws of TDD(according to Bob Martin)

• You are not allowed to write any production code unless it is to make a failing unit test pass.

• You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures.

• You are not allowed to write any more production code than is sufficient to pass the one failing unit test.

Page 10: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Acceptance Tests are different

• Workflow style, may have many branches

• Sequence of activities or events that produce results that can be validated

• Not concerned with implementation details

Page 11: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Acceptance Test Driven Development

• Business requirements are expressed as executable tests

• Developed collaboratively with the business

• Used as documentation

Page 12: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

FitNesse is a lightweight, open-source framework that makes it easy for software teams to:

• Collaboratively define Acceptance Tests

• Run those tests and see the results

Page 13: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Problems with acceptance tests

Page 14: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Page 15: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Page 16: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

It is hard to make acceptance tests clear

• You can’t tell what the test is doing doing without looking at the code

• Each test requires an explanation

Page 17: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Technically aligned rather than business focused

• The business folks did not value our acceptance tests

• In terms of process steps, not the user voice

Page 18: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Prone to “fantasy state”

• Even though we practiced TDD and had a lot of tests, we still had bugs

• Wrong entry point encourages fake data

• Symptom of technically aligned tests

Page 19: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

High Maintenance

• Each new feature requires a new Fixture to set up the scenario

• Adding a new scenario requires small changes to many other tests (aka Shotgun Surgery)

• The tests were too low-level, more like glorified unit tests

Page 20: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Common problems with acceptance tests

• Not clear or easily understandable

• Technically aligned, not business focused

• Prone to fantasy state

• High Maintenance

Page 21: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Page 22: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Page 23: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Personas

Page 24: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Creating Personas

Page 25: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

...Personas Cont’d

Page 26: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

...Personas Cont’d

Page 27: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

How Personas Help

• Create a shared language between the business team and developers

• Requires the developers step out of the technical world view

• Think about the software from the perspective of the user

Page 28: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

PDD

Page 29: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Focus on Test Clarity

• When a business term changed, we renamed everything to reflect the language that the business used

• Using Personas to talk about new stories became much more natural because everyone knew what behaviors each persona possessed

Page 30: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Make Acceptance Tests always make sense to the business

• We sought ideas to make tests more clear

• Our aim was to make the purpose of our tests clear enough that we didn't have to explain the scenario to the business, it should be obvious

Page 31: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Don’t Fake It

• Use the real system to set up state

• The way we implemented our personas, they used the real system to enter data instead of setting up a fake state

Page 32: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Implementing Personas

• We experimented with using personas in one of our tests because we used personas when discussing our stories

• Our first test looked radically different than our old tests

Page 33: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Page 34: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Three Guidelines of PDD (according to me, inspired by “The Dude”)

The Acceptance Test...1. makes sense to the business

2. walks the life of the persona

3. emulates the business process

Page 35: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Impact

Page 36: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Increased Test Clarity

• When the tests made sense to the business, the business team took ownership for creating new tests and analyzing existing tests

• The quality of our tests continued to improve because the business team could express requirements through personas

Page 37: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Provides business with a language for expressing requirements

• Once we had the basic abilities of our first persona, we paired with our BA to show what else is possible.

• Our personas grew into a rich toolkit that provided a common language for BAs and Programmers to communicate

Page 38: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

High-Bandwidth Communication

• By using the same terminology the business team used in our tests, we avoided the cost of translating

• Personas were canned-context that could express a lot of background information for the users involved in a scenario very effectively

Page 39: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Reduced Maintenance

• Instead of coding the scenario into the Fixture, it was defined by the interaction between personas in the test

• Our Fixture code changed much less frequently and new scenarios could often be built without any changes to test code

Page 40: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Increased Trust

• Because our personas harnessed the real system instead of faking state, they were much more truthful

• Failing tests were real bugs

• We caught several bugs by simply cutting tests from the old way to using personas

Page 41: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Take Aways

• FitNesse is an excellent tool to collaborate with business experts for developing software

• Clarity is king because it reduces the cost of translation

• Providing business people with the tools to express what they want is worth the investment

• To sustain agility and avoid stagnation, make time to experiment with new techniques and tools

Page 42: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Summary

• The goal is to deliver working software to fulfill a business need

• Quality, communication, and trust are necessary to succeed

• PDD is one technique to help you get there

Page 43: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Business Stories

•No Funding in 2008•High-Risk Fraud Alerts

Page 44: Persona Driven Development - Agile Alliance · 2019. 12. 16. · Acceptance Test Driven Development • Business requirements are expressed as executable tests ... Persona Driven

© copyright Tim Andersen, 2010. All rights reserved.

Thank you

[email protected]@timander