Narrative Acceptance Tests - A Behaviour Driven Approach
Acceptance Tests elaborate a user story & are essentially behaviour specifications, expressing examples of how the application will actually be used. These should represent customer-intent in terms the customer understands.
This session shows developers and testers how to transcribe their understanding of customer intent in a way that makes sense to customers. Using the popular BDD Given/When/Then approach to acceptance tests, participants will learn how to leverage the popular Fit framework to replicate that approach. Alternatives to using Fit, including using code, will also be explored.
- Introduction to the topic, and presenters
- Presenters summarise a User Story to the group
- Presenters play the role of customer with participants playing the part of the team - guided to ask appropriate questions to capture examples that illustrate the story
- Presenters exchange roles with the participants and elaborate the first example for the user story into an acceptance test (captured in plain text)
- The group splits into pairs to practice writing the second acceptance test
- Several pairs’ acceptance tests are collected in order to discuss with the group
- Presenters show their version of the second acceptance test
- Presenters show how these are sometimes expressed using a table-heavy approach in FitNesse
- Presenters then show how to represent these tests so that they look almost identical to the plain-text tests in FitNesse (using a soon to be released Fixture)…
- Presenters then show how these tests can also be written in code with a fluent API
- Group discussion of alternatives and reflection on learning points
Notes: a) The yet to be publicly released Fit fixture has been in use on a large enterprise programme of development with one of our clients
b) For the benefit of the reviewers, you can see illustrations of using code to express acceptance tests here: http://bitbucket.org/testingreflections/jnarrate/src/tip/JNarrateExample... http://bitbucket.org/testingreflections/jnarrate/src/tip/JNarrateExample...
- How to express the scope of a user-story with acceptance tests
- How to express automated acceptance tests in a customer-focused way
- How writing acceptance tests using fluent APIs can be an alternative to more conventional plain-text or HTML based frameworks
- How to leverage tools such as Fit/FitNesse - moving beyond table-ridden tests - to create expressive BDD style behaviour-specifications
- Reduce duplication between explanatory text and executable statements
- Be aware of several frameworks that support, or can be made to, support this approach

Download session PDF
Add to calendar