Arunkumar Khannur's Software Testing Knowledge Center
   
 

11.7. Use Case Diagrams- Diagrammatic Representation

Use case diagrams depict the functionality of a system. To successfully apply use case diagrams, we must first understand the types of elements used in use case diagrams, viz,
  • Actors and their Diagrammatic Representation
  • Use Cases and their Diagrammatic Representation
  • Association Relationships and their Diagrammatic Representation

Following table provides notational representations of actor and association relationships. Interaction between actor and system is represented by primary actor, secondary actors, and connecting them with association relationships.

Following sections discuss each element in detail.
11.7.1. Actors and their Diagrammatic Representation
Actors are used to model and represent roles for “users” of a system, including human users and other systems. Actors are denoted as stick person icons.
They have the following characteristics:
  • Actors are external to a system
  • Actors interact with the system. Actors may use the functionality provide by the system, including application functionality and maintenance functionality. Actors may provide functionality to the system. Actors may receive information provided by the system. Actors may provide information to the system.
  • Actors have actors instances or objects that represent specific actors.

11.7.2. Use Cases and their Diagrammatic Representation
Use cases are used to model and represent units of functionality or services provided by a system (or parts of a system: subsystems or classes) to users. Use cases are denoted as ellipses or ovals. They may be enclosed by a system boundary or rectangle labeled with the name of the containing system. They have the following characteristics:
  • Use cases are interactions or dialogs between a system and actors, including the messages exchanged and the actions performed by the system. Use cases may include variants of these sequences, including alternative and exception sequences.
  • Use cases are initiated by actors and may involve the participation of numerous other actors. Use cases should provide value to at least one of the participating actors.
  • Use cases may have extension points that define specific points within an interaction at which other use cases may be inserted.
  • Use cases have use case instances or objects called scenarios that represent specific interactions. Scenarios represent a singe sequence of messages and actions.

11.7.3. Association Relationships and their Diagrammatic Representation
Association relationships between actor and use case are used to indicate that the actors participate and communicate with the system containing the use cases.

Association relationships are denoted as solid lines or paths. Arrowheads may be used to indicate who initiates communication in the interaction. If an arrowhead points to a use case, the actor at the other end of the association initiates the interaction with the system. If the arrowhead points to an actor, the system initiates the interaction with the actor at the other end of the association.

Includes relationships from primary use cases to inclusion use cases are used to indicate that the primary use cases will contain the inclusion use cases; that is, the primary use case will contain the inclusion use case.

A primary use case defines the location at which the inclusion use case is included. Includes relationships are denoted as dashed lines or paths with an open arrowhead pointing at the inclusion use case and are labeled with the keyword (stereotype). The insertion of the inclusion use case involves the execution of the primary use case up to the inclusion point, inserting and executing the inclusion use case, and then continuing with the execution of the primary use case.

Extends relationships from extension use cases to primary use cases are used to indicate that the primary use cases may be augmented by the extension use cases; that is, the inclusion use case will augment the primary use case if an extension condition is satisfied. A primary use case defines the extension point. An extension use case defines the extension condition that must be satisfied in order to insert the extension use case into the primary use case.

The insertion of the extension use case involves the execution of the primary use case up to the extension point, testing the extension condition and inserting and executing the extension use case if the condition is satisfied, and then continuing with the execution of the primary use case. Extends relationships are denoted as dashed lines or paths with an open arrow-head pointing at the extension use case and are labeled with the extension condition in square brackets, the <> keyword (stereotype), and the extension point name in parentheses. Extension points are identified in a compartment labeled “Extension Points” in the primary use case.

Generalization relationships from specialization use cases to generalized use cases classes are used to indicate the specialization use cases are consistent with the generalized use cases and may add additional information. A specialization use case may be used in place of a generalized use case and may use any portions of the interaction of the generalized use case. Generalization relationships are denoted as solid lines or paths with a hollow arrowhead pointing at the generalized use case.

Generalization relationships from specialization actors to generalized actors are used to indicate the specialization actors are consistent with the generalized actors and may add additional information. A specialization actor may be used in place of a generalized actor and receives the characteristics of the generalized actor.

Generalization relationships between actors are denoted similarly to generalization relationships between use cases.
 
 
Khannur's Book
Arunkumar Khannur, Software Testing - Techniques and Applications, Published by Pearson Publications, 2011 (ISBN:978-81-317-5836-6; Pages:341 + xxii)
Follow Khannur
         
Khannur's Company
ISQT Process & Consulting Services Pvt. Ltd., Bangalore, INDIA
Khannur's Software Testing Forum
STEP-AUTO Forum
 Contact Khannur
ISQT Process & Consulting Services Pvt. Ltd.
#732, 1st Floor, 12th Main,
3rd Block, Rajajinagar,
Bangalore - 560010, INDIA
Phone: +91 80 23012511
URL: www.isqtinternational.com
Email: khannur@isqtinternational.com
Skype: arun.isqt