Professional Documents
Culture Documents
Ch07 6 Usecases
Ch07 6 Usecases
(2nd edition)
Chapter 7.6
http://www.cs.gmu.edu/~offutt/softwaretest/
UML Use Cases
UML use cases are often used to express software
requirements
Transfer
Funds
– Details of operation
Activity Diagrams
Introduction to Software Testing, Edition 2 (Ch 07) © Ammann & Offutt 8
Use Cases to Activity Diagrams
Activity diagrams indicate flow among activities
Activities should model user level steps
Two kinds of nodes:
– Action states
– Sequential branches
Use case descriptions become action state nodes in the
activity diagram
Alternatives are sequential branch nodes
Flow among steps are edges
Activity diagrams usually have some helpful
characteristics:
– Few loops
– Simple predicates
– No obvious DU pairs
Introduction to Software Testing, Edition 2 (Ch 07) © Ammann & Offutt 9
ATM Withdraw Activity Graph
[ card
Insert ATM Card recognized ]
Prompt for PIN Enter PIN
[ card not [ card
[ < 3 tries ]
recognized ] expired ]
[ >= 3 tries ] Confiscate
Eject Card [ card not
Card
[card lost ] expired ]
[ invalid PIN ]
[card not
Prompt for Transaction Check PIN lost ]
[ valid PIN ]
Print Welcome
Eject Card Print Receipt Dispense Cash
Message