.
Table 4: Use case “add new link”.
Name UC-01. Add new link
Preconditio
n
No
Main
sequence
1. System select “top” category and
shows the form to introduce the
information of a link (SR-02).
2. If the user selects a different
category, system changes the category
and shows the form again.
3. User introduces information of the
new link and press insert button.
4. System stores the new link.
Errors 2. At any time, user can press cancel
button and exit of the form.
4. If link name or link URL is empty,
system shows an error message and ask
the information again
Table 5: Use case “search link by description”.
Name UC-02. Search link by description
Preconditio
n
No
Main
sequence
1. System shows a form to introduce
the description.
2. User writes the description and press
search button.
3. System searches all links with
description that coincides with
description of the user and executes
UC-05.
Errors No.
Table 6: Use case “show results”.
Name UC-05. Show results
Preconditio
n
A search have been made
Main
sequence
1. System shows a table with
all information about the
links found (SR-02).
Errors 1. If search returns empty values,
system show a “no links” message
Post
condition
No.
First activity is to identify variables of use cases.
Use case 01 needs information about the new link to
add, however, there are no other use cases that
depends of the new link. Thus, new link is an inner
variable. Use case 05 needs the results to show.
Those results are provided by use case 02 or 03 or
04. Thus, one of those use cases must be executed
before execution of use case 05.
Domain, in table 7, references to a store
requirement which define the information that
system manages for each link. Table 8 shows the
store requirement. A description in depth of store
requirements and their templates can be found in
(Escalona 04).
Table 7: Use case variables.
UC Name Type Domain
UC-01 New link Inner SR-01
UC-01, 04 Category Inner String
UC-02 Description Inner String
UC-02,
03, 04, 05
Result Out Array of SR-01
Table 8: Store requirement.
Name
SR-01. Link.
Use cases
UC-01, UC-02, UC-03, UC-04, UC-
05
Specific data
Name Domain
Identifier Integer
Name String
Category Integer
URL String
Description String
Date Date and time
Restrictions
Identifier must be unique.
Parent category must be an exiting
category.
Second activity is to build the behaviour model.
Variables in table 7 allow identifying the precedence
of each use case. Start and end points are easy to
identify due there is one use case to begin and
another one to exit the system. Behaviour model
from use cases has been building using steps
described in point 2.3 and is showed in figure 2. A
new use case has been added in figure 4. This use
case is executed when user access to the system and
shows a GUI to execute use cases from 01 to 04.
Next, we identify loops and assign a loop
variable to each one. Model in figure 4 has only one
loop, which represent several operations that a user
performs over the system. This loop has a variable
called “loop”. It range is from 1 to infinite.
However, it is impossible and unrealistic to test
infinite operations, so we set the variable in a range
from 1 to 4 operations.
Next activity is the derivation of canonical paths.
Due the simplicity of the system, only one canonical
path is enough to cover all possible paths. The
canonical path is showed in table 9.
Table 9: Canonical path.
(UC-00->{UC-01|{UC-02|UC-03|UC-04}->UC-05} )
loop
In activity 5, the canonical paths are instantiated
to generate sequences of use cases. Concrete values
to each variable and loop are assigned to each path
and a concrete use case is chosen in every selections.
We generate a different path for every different
value in the range of a loop variable. We also
generate a different path for every possible option in
GENERATING TEST CASES FROM SEQUENCES OF USE CASES
475