HomeArticlesRequirements ArticlesAre Use Cases a Substitute for Requirements?

Are Use Cases a Substitute for Requirements?

  • Print
  • E-mail

This article explores use cases and their relationship to requirements.

  • What are use cases and what is their best application on a project?
  • What is a requirement?
  • Why do people want to substitute use cases for requirements?
  • Can use cases be effectively substituted for requirements?

Use cases in software development are becoming very popular. One question I get repeatedly as I teach our seminars on Gathering, Documenting and Testing User Requirements is "Can use cases be substituted for user requirements?"

A Little Background

First, let's look at what use cases are and examine a little about their origin. It's important to get a good definition of terms, so for the term "use case," I went to one of the best sources I could think of, a paper written by Dean Leffingwell of Rational Software. Leffingwell defines a use case in the following terms:

"Technically, a use case describes a sequence of actions, performed by a system, that yields a result of value to the user."1

In the Unified Modeling Language, one of the models is a use case model, which shows various actors (users) and their relationship with processes described by use cases.

In most books and articles on use cases, the use case focuses on a sequence of actions from a particular actor's perspective. An expanded view of use cases may also include pre-requisites, expected results, exceptional conditions and alternate courses of action.

The great application of use cases is that they provide an effective format to communicate to developers how a user will perform a particular function in the context of the application.

A sample use case is included at the end of this article.

Contrast the idea of a use case with that of a Software Requirements Specification (SRS). A requirement can be defined as:

  • a software capability needed by the user to solve a problem that will achieve an objective, or
  • a software capability that must be met or possessed by a system or system component to satisfy a contract, standard, specification or other formally imposed documentation. 

I like the way that Dr. Timothy Korson states it, "Good software engineering is NOT use case driven! Requirements are important. Use cases are a good way to structure requirements, but if you care at all about component based development, reuse, robust distributed architectures, cost, schedule, etc., than you cannot afford to let any single viewpoint drive your project."

He goes on to say, "Good software engineering is driven by a number of concerns that are weighted differently by different organizations and different projects within an organization. These concerns include: technical design considerations, user requirements, reuse, modifiability, performance, standardization concerns, schedule pragmatics, and other business drivers.  Each project should be driven by a custom weighted vector of considerations. In each case, however, I think it is accurate to say that a project should be as much driven by domain concept modeling as it is driven by use case development."

The IEEE standard 830 is used to provide a full-featured standard for documenting requirements. The IEEE standard is very complete and has been used in a wide variety of applications. In addition to functionality, a standard may also address interfaces, performance, usability and testability. Use cases do not address these aspects of an application.

Where's the Beef?

My observation is that software developers, and to some degree users as well, have historically tried to avoid documenting requirements. After all, they are difficult to gather and document, plus they tend to change throughout a project.

However, no matter which technology or methodology is in vogue, we always get back to the issue of dealing with the description of the solution so we will know what to build, when the solution has been successfully delivered, and how to test the solution.

Use cases have given hope to people seeking to describe what is to be built without writing requirements. In some ways, people have tried to employ use cases as a middle ground approach that is not as detailed and structured as a requirement, yet more than no documentation at all. However, the traditional use of use cases is to describe a user's process, not the product.

This leads me to ask how far can use cases be extended before they are no longer use cases, but a hybrid requirement? In addition, is a hybrid document necessary? Why not just write a requirement document to describe features and use cases to describe standardization concerns, schedule pragmatics, and other business drivers.

Creative Uses for Use Cases

People have been able to creatively apply use cases for some very natural extended purposes, such as test scripts and test cases, as well as user documentation. Anything that requires the documentation of a process can benefit from use cases as input.

Summary

I don't believe that use cases are effective substitutes for requirements, or are the drivers of software development. Use cases are very helpful for conveying how someone will use an application, and this documentation can extend to helping testers design tests, as well as other purposes beyond building the application.

However, use cases fall short of being an effective vehicle for describing complex business rules, performance requirements and other non-process aspects of an application. As much as people may want to find a way to develop software without documented requirements, I just don't see it happening soon.

There should be a balance of well defined requirements and use cases that provide the usage context for an application.

These two effective documents, plus other models and techniques, such as prototyping, can provide a clear picture of what is to be built and how to test it.

1. Leffingwell, Dean. Features, Use Cases, Requirements, Oh my!  http://www.leffingwell.org/Document_Store/Features.pdf

2. Dorfmann, Merlin, and Richard H. Thayer. Standards, Guidelines, and Examples of System and Software Requirements Engineering. Los Alamitos, CA: IEEE Computer Society Press, 1990.

3. Korson, Timothy. Constructing Useful Use Cases - http://www.software-architects.com/publications/index.html Page 33 Volume 5, Issue 8 August 2002

Last Updated on Tuesday, 10 May 2011 19:45

 

Randy's Newest Book

Frustrated and confused by trying to test large, complex and undocumented legacy systems? Read Randy's newest book! Click on the cover to buy it.

More...

Buy the Book!

Randy's book, Surviving the Top Ten Challenges of Software Testing, will help you solve some of your toughest testing problems: people problems!

Click on the image to buy it from Amazon.com.

Twitter Feed

rricetester: @madgreek65 Thanks for the follow!

Free Updates in Your E-mail Inbox

We never sell or release your infomation to any other organization.
Your Name
Your E-mail Address

Events

ISTQB Foundation Level Training in Software Testing:

New Orleans, LA - Aug 22 - 24, 2012

You can attend this event remotely through our new TrainingLink platform!

ISTQB Advanced Test Analyst Course:

Newark, NJ - Sept. 17 - 21, 2012

Testing Complex and Undocumented Legacy Systems:

Rome, Italy - June 18 - 20, 2012

Practical Software Test Automation:

Rome, Italy - June 21 - 22, 2012

Who's Online

We have 66 guests online

Testimonials

"Thanks to Randy's expertise and talents our team is on their way to an improved quality product!" 

Allace B. Buchmelter, Manager of Quality Assurance
CyberMetrics Corporation

"I was your student in Software Testing Foundation Level Course, and I recently successfully passed the exam with the score of 97%. I want to thank you very much for your excellent course which made me capable to achieve this certification. Without your course I could not do that. May I wish you all the best in your life and work!"

V.M. - Systems Tester

"Randy really spoke to the real world of testing - I could fully relate! I'll be back for the full basic course!"

B.K. - Structured UAT Participant

"Just wanted to let you know I took the CTFL exam on Friday and got a 95%! Thanks for your online training course and for answering questions as they came up!"

M.H., Florida

 

Share This Page!