What is a “Use Case”? June 28, 2009
Posted by hubtechinsider in Project Management.Tags: Agile Software Development, product management, Project Management, Software, Software Development
trackback
A Use Case is a fundamentally prose text description of a system’s behavior under various conditions. These conditions are primarily responses of the system to requests from one of the stakeholders of the system in question, usually referred to as a “Primary Actor”.
A Use Case represents a type of contract between the stakeholders of a system about the behavior of that system under these various conditions, or “States”. The Primary Actor initiates an action with the system in order to accomplish a task or achieve a goal. Myriad scenarios can unfold subsequently, and those scenarios depend upon the type of interactions or requests made by the Primary Actor and the conditions or states which accompany those requests. The use case succinctly codifies these various scenarios together into a presentable format.
Although use cases can take the form of flow charts, “Petri nets”, sequence charts or even programming languages, they are usually (and through general practice and agreement, best) presented in a prose text format. They are a way to communicate the intended behavior of a system (many times of course a software system) amongst members of a project team. It should not be necessary for project team members to have special training in order to interpret a well written use case. Use cases serve to encourage communication between project team members and also to stimulate discussion around contention points of a system’s intended behavior.
Some project teams may choose to document the requirements of a software system only through the use cases themselves. Other project teams may choose to have separate, traditional requirements documents. Many project teams may choose to provide both forms of documentation, use cases and requirements documents. I am of the school that use cases, requirements documents, and test cases form a triad that can help to unequivocally clarify the intended behavior of even the most complex software systems and also give the testing team the very best chance to perform their job with precision and efficiency.
The same basic rules of writing apply to all of the above listed approaches, even though different project teams will choose to write with unique levels of technical detail and completeness of description.
A well written use case should be easy to read and consists of sentences that are succinct and written in only one grammatical format, that being a simple action step. An action step is defined as an event in which one actor achieves a result or passes information or results to another system actor. An actor is defined as anyone or anything with behavior.
Reading a use case should not take more than a few minutes, although learning how to write a good use case is considerably harder. Three fundamental concepts apply to the writing of use cases, all three of which need to be mastered in order to become an effective use case writer:
- Scope: What is the system being discussed, and what are the boundaries of the actions within that system to be described?
- Primary Actor: Who is the user who hopes to achieve a goal through interaction with the system in question?
- Level: Is the goal trying to be achieved by the Primary Actor primarily a high level goal or a low level goal?
The components of a use case consist of the following:
Stakeholder: someone with an interest at stake in the proper behavior of the system under discussion.
Preconditions and Guarantees: States or conditions that must be true both before and after the execution of the sequenced steps in the use case.
Main success scenario: A use case scenario in which no deviations from the expected behavior of the system are encountered.
Extensions: Extensions describe alternate scenarios or states that can be encountered during the execution of a use case. Numbering convention used in the writing of a use case indicate to the reader points at which deviations from the main success scenario are possible. For example, steps 2a and 2b are indicative of twin conditions that can be arrived at by the primary actor during the execution of step 2.




Comments»
No comments yet — be the first.