My set up is following:
- WPF client writting using MVVM pattern
- A set of unit tests
- A set of SpecFlow scenarious
When creating SpecFlow scenarios, I firstly draw a state machine diagram to see all the possible permutations of user interactions and the requirements to go from one state to another. Then I create a list of all possible scenarios.
For example:
- User presses Yes -> Uploads document -> Deletes document -> clicks
submit - User presses Yes -> Uploads document -> cliks submit
- User presses Yes -> clicks submit
This allows to make sure that we test all possible scenarios and don’t miss any. However this is a tedious process and it becomes quite problematic if the requirements changes.
I wonder if there is a framework which could create your scenarios from your State machine, so if the step is deleted from the state machine it automatically recreates your scenarios.
If you are really into generating test cases from a state machine, I’d suggest that you have a look into “Model Based Testing” tools.
In the .NET world, spec explorer allow you to do that: SpecExplorer 2010