I need some help in traversing all transitions in a state machine. (all-transitions is a coverage criteria) I have a state machine and I want to cover all transition开发者_运维百科s with minimum number of paths from source to target/abort state. ex: A->B B->B B->C B->D so paths are: A->B->B->C, A->B->D
Just write some test code to invoke your state machine:
- Two calls where you expect to end with state C.
- Two calls where you expect to end with state D.
Your test code should verify the end state.
精彩评论