Build the statechart diagram corresponding to the PurchaseTicket use case of Figure 11-24. Generate test cases based on the statechart diagram using the state-based testing technique. Discuss the number of test cases and differences with the test case of Figure 11-25.
What will be an ideal response?
Figure 11-2 depicts a possible statechart diagram and a series of derived test cases for this exercise. The main
difference between these test cases and those in the book is that they have been more systematically generated, and
thus, cover more possible transitions. It should also be noted, however, that this set of test cases depends on the level
of detail statechart diagrams. For example, in this sample solution, we did not differentiate between the case when the
user inserts the exact amount and the case when the user inserts more money than necessary. Doing so would have
added an additional state and transitions, and consequently, additional test cases. Moreover, this technique fails to
detect omissions error as in the case of path testing the isLeapYear() method. If behavior is missing from the system
or the statechart, it is unlikely that a test case would uncover such a defect.
You might also like to view...
Select the false statement. Container adapters:
a. Do not provide the actual data structure implementation for elements to be stored. b. Have their data stored by underlying data structures. c. Can push and pop elements. d. Have limited iterator support.
Virtual machines promote ________, the ability for software to run on multiple platforms.
a) scalability b) extensibility c) portability d) security
How do you launch an app from the Start screen?
A) double-click it B) triple-click it C) click it D) right-click it
Office provides a shortcut for opening recently used files: Click the ____ tab in any of the Office programs, and then click Recent in the navigation bar.
A. Home B. Edit C. File D. Insert