Skip to main content

Use Case as a Black Box

Consider the following use case:
Purchase Items
Actor: Purchaser
Precondition: Purchaser types at least thirty words per minute and has a web navigation efficiency rating of at least 40.
Postcondition: For the average Purchaser acting at full efficiency, the number of seconds elapsed is no more than 30 + 20 * n, where n is the number of items purchased.
The name of the use case represents a functional requirement. What does the product do, or enable the user to do? Purchase items.

What are we to make of the preconditions and postconditions? What relationship do they have to the requirements for the product? Answer: the preconditions and postconditions are the nonfunctional requirements attached to the functional requirement. Another way of expressing the nonfunctional requirement would be as an attribute and associated constraint:
Usability: For a Purchaser who types at least thirty words per minute and has a web navigation efficiency rating of at least 40, it shall take no longer than 30 + 20 * n minutes to purchase n items.
When you think about requirements in this manner, it becomes apparent that you shouldn't just treat the product as a black box, but also the use cases. The steps in use cases don't matter as long as your product fulfills the preconditions, postconditions, and invariants.


Bernd Eckenfels said…
I just hate the term "Nonfunctional requirement" since a product which is not reliable or too slow is simply not functional.

I have written a german article about that, and I am also linking to Randy Miller (of Microsoft) ranting about the same:

Dear Roger Cauvin:

I reached here through your discussion on Req Engg Yahoo Group with Byron.

The Use Case description given is widely followed but it is not very helpful to proceed to other UML Diagrams or identify Design Classes.

I recommend that a Use Case be described through User Actions and System Responses identifying DATA corresponding to user actions / real-world phenomena.

Please see the the attachement to my mail and give your feedback.

Putcha V. Narasimham,
Roger L. Cauvin said…
Putcha, defining use cases as a black box doesn't preclude also fleshing them out and showing the user stimuli and system responses.

The steps in use cases are interaction design.

By specifying the use case preconditions, postconditions, invariants, you define the requirements that the internal use case steps must satisfy.

I have revisited you site w r to Use Case as a Black Box and seen your response to my post of April 15, 2008.

I appreciate the distinction between Use Case Specification in terms of AA external conditions / constraints of a Black Box for which there could be BB multiple interaction sequences (created through Interaction Design).

Such distinction enables creation of a series of Ends (requirements) and Means (of meeting the requirements), each clear and small enough for quick and practical agreement.

Putcha V. Narasimham
Roger L. Cauvin said…
Thanks for following up, Putcha!
David Wright said…
That's a non-functional requirement, alright. Where do I get the Functional Requirements for this Use Case?
Roger L. Cauvin said…
David, as I mentioned in the post, the functional requirement is implied by the name of the use case. In this case, the functional requirement is to enable the user to purchase items.

I suspect you would characterize the individual steps in the use case as functional requirements or as implying certain functional requirements. While I understand this nomenclature is popular, I believe it leads to logical contradictions. Check out the comments on this Tyner Blain blog entry for some examples.
David Wright said…
I can't say I follow you to a conclusion about logical contradictions.
Roger L. Cauvin said…
The contradictions and absurdities are numerous. The comments on the Tyner Blain blog entry pointed to a couple:

- The notion that product requirements are not functional yet in some cases state what the system should do.
- The misnomer of "functional requirements specifications" that also contain nonfunctional requirements.

But another one that relates more directly to our discussion is as follows:

P1. Interaction designers specify how the product will interact with, and respond to, users.
P2. If a specification describes only how the product will interact with, and respond to, users, it does not contain design.
C. Therefore, the specifications that interaction designers produce do not contain design.

P1 is an established definition of interaction design. Correct me if I'm wrong, but you believe that P2 is correct.

If you accept both P1 and P2, then you must accept C. But C is absurd (and can be further elaborated to show an explicit contradiction).

Popular posts from this blog

Why Spreadsheets Suck for Prioritizing

The Goal As a company executive, you want confidence that your product team (which includes all the people, from all departments, responsible for product success) has a sound basis for deciding which items are on the product roadmap. You also want confidence the team is prioritizing the items in a smart way. What Should We Prioritize? The items the team prioritizes could be features, user stories, epics, market problems, themes, or experiments. Melissa Perri  makes an excellent case for a " problem roadmap ", and, in general, I recommend focusing on the latter types of items. However, the topic of what types of items you should prioritize - and in what situations - is interesting and important but beyond the scope of this blog entry. A Sad but Familiar Story If there is significant controversy about priorities, then almost inevitably, a product manager or other member of the team decides to put together The Spreadsheet. I've done it. Some of the mos

Is Customer Development Pseudoscience?

The “Science” of Lean Startup Lean startup practitioners embrace the scientific method, seeking the "truth" about what business model and strategy will lead to product success. We do so by: Formulating hypotheses Crafting and running experiments to test them Learning from the experiments Iteratively feeding our learnings back into revised hypotheses Sounds pretty scientific, at least in spirit, doesn't it? Yet this process actually neglects a key ingredient in the scientists' mode of operation. To identify what’s missing, let’s examine “customer development”. Customer Development Steve Blank is one of the pioneers of the lean startup movement. He introduced into the lean startup lexicon the term “customer development”. Customer development consists of sessions and interactions with customers to test hypotheses. For example, a product manager might interview a prospect, asking if she agrees with the product manager’s hypotheses about the problem

Interaction Design: the Neglected Skill

Your product development organization has a big, gaping hole in it. (Be prepared to feel defensive as you continue reading.) One of the most important roles in product development is the role of interaction designer. An interaction designer designs how the users will interact with the product and conceptualize the tasks they perform. He decides whether, for example, the user interface will be command driven, object oriented (clicking on objects then specifying what to do with them), or wizard based. The interaction designer decides the individual steps in the use cases. Every company has one or more people that play the interaction designer role. Usually, those people have little or no expertise in interaction design. Sadly, they typically don't even realize how unqualified they are. Let's see who typically plays the role at companies. Engineer . An engineer is an expert on building what is designed. Yes, an engineer may know how to design the internal structure of the hardware