Becoming a Software Developer Part 5: Creating Acceptance Tests from Use Cases
At the end of my last article, "Becoming a Software Developer, Part 4: Understanding Use Cases and Requirements," we finished off with a partially elaborated use case. To fully elaborate the use case, we need to investigate the extension conditions and the extension handling steps.
For those of you who did the optional reading, Alistair Cockburn's book Writing Effective Use Cases (Addison-Wesley, 2000, ISBN 0-201-70225-8), our sample use case is only documented to two levels of precision, the extension conditions will add a third level of precision, and the extension handling steps will add a fourth level.
Right now, we have a readable description of how an actor (the Club Secretary) uses the system to achieve one of the actor's user goals (in this case, notifying members about special events). We also have some guarantees that define correct operation of the system.
Club Secretary : Notify members about special events. Send out information about forthcoming events and races to members.
Event details are recorded in the application.
Members are never sent a duplicate notice about the same event.
Selected members are sent email containing an event notice.
The notice is recorded as being sent to the selected members.
Main Success Scenario:
Club Secretary: Enter event details.
Club Secretary: Choose members to send notice to.
Membership System: Display number of members to be notified and await confirmation from the Club Secretary.
Membership System: Send email notification to every selected member.
Membership System: Record that notice was sent to selected members.