Software Engineering I
States and Test Cases
– Computer Science and Software Engineering Department
Copyright By PowCoder代写 加微信 powcoder
• Remember the definition of state.
• Get to know the elements of the UML statecharts.
• Use UML statecharts to design test cases.
Statecharts
David Harel. Statecharts: a visual formalism for complex systems. Science of Computer Programming, Vol. 8, pp. 231-274 (1987)
Statecharts
Nested states
State in testing
• Scenario template (Given – When – Then)
– GIVEN: status = OFF
– WHEN: power()
– THEN: status = ON
//preconditions, the initial state //what caused the transition
//post-conditions, the expected state
– GIVEN: light = YELLOW
– WHEN: nextState()
– THEN: light = RED
Grouping software elements
– Smallest grouping that can be executed independently.
– Smallest grouping of units.
• Component
– Top-level division of a system as defined by its software architecture.
– The entire codebase under study.
Dependency graphs
“Module C depends on D”
“Module A depends on B and C”
Dependency graphs
• Remember the definition of state.
• Get to know the elements of the UML statecharts.
• Use UML statecharts to design test cases.
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com