UML Weekend Crash Course™ - To Parent Directory

UML Weekend Crash Course™ - To Parent Directory UML Weekend Crash Course™ - To Parent Directory

crnarupa.singidunum.ac.rs
from crnarupa.singidunum.ac.rs More from this publisher
01.01.2015 Views

Session 8—Identifying the Use Case Scenarios 89 In Figure 8-5, you identify the third scenario by continuing from the “Item Found” decision of Scenario 1 (near the bottom of Figure 8-5). But this time choose the path where the item was not found. Following this path leads you back to the top of the loop at the decision “Done or no unfilled items” Both of the paths out of this decision are already handled by Scenario 1, so you stop. This segment is Scenario 3. Scenario 1 Done or no unfilled items [True] [False] Choose Item Find Item (Locate Product) Use Case Scenario 3 [No] Item Found [Yes] Figure 8-5 Scenario 3

90 Saturday Morning In Figure 8-6, you identify the fourth scenario by continuing from the “Any unfilled quantities” decision of Scenario 1. But this time choose the path where there are unfilled quantities. Following this path tells you to create a backorder before the scenario ends. This segment is Scenario 4. Scenario 1 [True] Any unfilled quantities [Yes] [No] Create Back Order Scenario 4 Figure 8-6 Scenario 4 The goal of developing scenarios is to account for every logical possibility in the flow of the Use Case. Every segment identifies a unique line of logic within the total Use Case. But you’re not done yet. Applying Use Case scenarios Technically, the definition of a Use Case scenario says that each scenario describes a single logical path through a Use Case. Using the Activity diagram, you can visually identify each path simply by following the connecting lines in the diagram. But in the Fill Order Use Case example, each individual arrow traces a separate logical segment, not necessarily a complete logical path, from the beginning of the Use Case to the end of the Use Case. For example, alternative Scenario 3 only identified the steps that were unique from those already identified by Scenario 1. I did not show repeated segments of paths already singled out by a previous scenario. This convention is a common one employed to avoid redundancy and extra work. When I write the formal scenarios, or test cases, I simply build the test case from the scenario segments. By doing a little mixing and matching, I can provide comprehensive coverage of every combination. For example, to fully specify Scenario 2, I would include the first two steps and the decision from Scenario 1 plus the unique steps of Scenario 2. Note too that, whenever you encounter a loop, the scenario maps out only a single pass through the loop. To test the loop thoroughly, run the scenario segment multiple times, remembering to test the boundary conditions.

90<br />

Saturday Morning<br />

In Figure 8-6, you identify the fourth scenario by continuing from the “Any unfilled<br />

quantities” decision of Scenario 1. But this time choose the path where there are unfilled<br />

quantities. Following this path tells you to create a backorder before the scenario ends. This<br />

segment is Scenario 4.<br />

Scenario 1<br />

[True]<br />

Any unfilled<br />

quantities<br />

[Yes]<br />

[No]<br />

Create Back<br />

Order<br />

Scenario 4<br />

Figure 8-6 Scenario 4<br />

The goal of developing scenarios is to account for every logical possibility in the flow of<br />

the Use Case. Every segment identifies a unique line of logic within the total Use Case.<br />

But you’re not done yet.<br />

Applying Use Case scenarios<br />

Technically, the definition of a Use Case scenario says that each scenario describes a single<br />

logical path through a Use Case. Using the Activity diagram, you can visually identify each<br />

path simply by following the connecting lines in the diagram. But in the Fill Order Use Case<br />

example, each individual arrow traces a separate logical segment, not necessarily a complete<br />

logical path, from the beginning of the Use Case to the end of the Use Case. For example,<br />

alternative Scenario 3 only identified the steps that were unique from those already identified<br />

by Scenario 1.<br />

I did not show repeated segments of paths already singled out by a previous scenario.<br />

This convention is a common one employed to avoid redundancy and extra work. When I<br />

write the formal scenarios, or test cases, I simply build the test case from the scenario segments.<br />

By doing a little mixing and matching, I can provide comprehensive coverage of<br />

every combination. For example, to fully specify Scenario 2, I would include the first two<br />

steps and the decision from Scenario 1 plus the unique steps of Scenario 2.<br />

Note too that, whenever you encounter a loop, the scenario maps out only a single pass<br />

through the loop. <strong>To</strong> test the loop thoroughly, run the scenario segment multiple times,<br />

remembering to test the boundary conditions.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!