Arunkumar Khannur's Software Testing Knowledge Center
   
 

11.3. What are Use Cases?

Use case is the model used to manage and provide focus for a problem-solving effort from user view. Use case represents abstraction of the functionality of a system from user view. By being abstraction of user view, use cases focus on those things that are relevant (essential) to the user while avoid those things that are irrelevant (incidental) to the user. The use case model helps the customer, users and developers agree on how to use the system.

According Jacobson’s original definition: “A use case is a specific way of using the system by using some part of the functionality. A use case constitutes a complete course of interaction that takes place between an actor and the system.” The developers of UML- Jacobson, Booch, and Rumbaugh, and Kruchten defined use case as: “ The specification of sequences of actions, including variant sequences and error sequences, that a system, subsystem, or class can perform by interacting with outside actors that yields an observable result of value to a particular actor.” A somewhat more user-centric definition is offered by Fowler AS: “A use case is a possible sequences of interaction between the system and its external actors that captures some user-visible function and achieves a discrete goal for the user.”

Use cases have been defined not with reference to users but with reference to “actors”—external agents interacting with a system. For software design, actors may include other systems that must interact with the system being developed. Actor is a role that a user plays with respect to the system, and need not be human. A single Actor may perform in many Use Cases and a Use Case may have many Actors.

In use cases, the system is treated as a single entity, which interacts with the actors. The use case will talk about sequences of interactions, and it will talk about variations in the sequences. These together are referred to as scenarios. A scenario is a composition of one or more enacted (instantiated) use cases expressed as an extended narrative or sequence of events or states forming a plausible realistic story-line.

The purpose of a Use Case May include:
  • Promoting Communication
  • Understanding Requirements
  • Helping to identify attributes that would be part of encapsulated data
  • Focusing on the “What” rather than the How
  • Providing Prototype Test Cases

A use-case describes a situation that the system may or may not be able to handle. Use-cases are the ways in which real-world actors interact with the system.

The Use Cases are used to discover the objects (in the class diagram) that will construct a system to satisfy all functional requirements, and to construct the scenarios that ensure the functionality can be supported. Conceptually, we can view the functionality as a set of processes that run horizontally through the system, and the objects as sub-system components that stand vertically. Not every functionality uses every object, but each object may be used by many functional requirements. This transition from a functional to an object point-of-view is accomplished with Use Cases and Scenarios.

The collection of Use Case diagrams provides a ‘context’ diagram of system interfaces. Each Use Case constitutes a complete list of events initiated by an Actor and it specifies the interaction that takes place between an Actor and the System. In a Use Case the system is viewed as opaque, where only the inputs, outputs, and functionality matter.
 
 
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