Explain my evolving methodology.
Created by: agentlewis
I have been thinking about spec writing for a long time. In this project I tried to both do a Domain Driven Design/Development to define all the requirements of the app. Along the way I came up with a different approach to organising/rationalising the specs.
It goes a little something like this:
- Define an event. (gherkin: when)
- Define the conditions that could precipitate the event. (gherkin: givens)
- Define the consequences for each of the scenarios. (gherkin: thans)
Note:
- There is only one event (When) per scenario. Ands/Buts are used to define validation criteria at the event occurrence. eg
Given I am an Anonymous User
When I send my New Account data
But my user name is already taken
Than I receive a helpful error message "Username taken :("
- And works well for conditions. But doesn't make sense... (thoughts)
Given I am an Anonymous User
And I have a shopping cart cookie
When I load any page
Than my cart is populated with its last items
- And & But can be used successfully for consequences
Given I am an Anonymous User
When I click on show more
Than I see more stuff
But I don't see show more anymore
With this understanding of specs I have come to see Discovery Sessions with clients to be more about trying to define all the events that should occur in the app and the main scenarios that go with these.
I also think there are different types of events. UI events, time based events and processing events. In a way an event can be thought of as a function being run.