1

I am trying to give examples of a use case and a scenario for a library management software system, I was reading this question: Difference between scenario and use-case and I got confused.

Namely, in the scenario section put the following:

A student looking for supplementary material about a subject comes asking for help, the user searches books by the relevant subject and a list of available books pop-up, the librarian gives the name of the books to the student with their location in the library then proceeds to put his choice of books on loan to them

I am trying to turn this into a use case and I got confused, namely, the accepted answer in the linked post states the following:

Usually, the use case is more granular than the scenario. In the development of these, it usually involves coming up with a scenario and then defines all the use cases that fit into that particular scenario

After reading this, I feel like my scenario is too detailed and falls more into the use-case definition, however, if that is a use case I can't see how it can fit into a particular scenario at first glance. Any help would be appreciated.

1
  • so you might have two or three use cases from your example scenario. "librarian needs to log on to the system" "librarian needs to search for multiple books by subject" "librarian needs to see location of book in library"
    – Ewan
    Apr 2, 2021 at 9:36

2 Answers 2

5

After reading this, I feel like my scenario is too detailed and falls more into the use-case definition

It's not that what you picked is inherently a use case, it's that in this particular example, there is only one real use case and scenario, so they look eerily similar.

The difference between a use case and a scenario is a matter of focus.

Scenario: Students often enter the library looking for books on a given subject matter.
Use case: The user searches the book list in the app for books by subject matter and is presented with a filtered list of books.

It becomes easier to understand the difference when a scenario has more than one use case.

Scenario: Students use the soda machine to buy refreshments when the campus cafeteria is either closed or too far away.
Use case 1: The customer inserts coins into the machine, selects their drink, and receives the drink of their choice.
Use case 2: The customer inserts a debit card into the machine, selects their drink, confirms the card transaction, and receives the drink of their choice.

Use cases are very specific interactions between your software and its consumer (often a person, but not necessarily so), denoting the interaction between them.

Scenarios, by comparison, are much broader in that they convey the intention/expectation of the consumer, so that developers of the software are able to understand who they're writing the software for.
During development, you regularly come across these instances where developers see two equally viable avenues with specific drawbacks/benefits that are not important or explicitly part of the requirements. Scenarios help convey the intention of the user and therefore help answer which benefits/drawbacks are relevant and which are not.

For example, suppose that during our soda machine development stage, we wonder if the machine needs to be able to handle those narrower cans as well. I know it's a silly example, but the scenario could help us conclude that this machine is targeted at students, making a reasonable inference that they're likely to want to drink energy drinks which often come in these narrow cans, and thus making it very likely that supporting these narrow cans is highly desirable.

It's a silly example, but it highlights the difference. The use case is very precise about what it wants and how it wants it. The scenario is much more free form, lacking in technical detail but making up for it in context that can help guide tangential decisions.

2

I think part of the problem is that I don't agree with either of the (as-of-now) top-voted answers in the question you linked to. Instead, I think this answer more accurately captures the relationship between "use case" and "scenario". It's also more consistent with other sources, such as Cockburn's Writing Effective Use Cases.

Cockburn talks about the "main success scenario" through the use case, as well as extension (or variation) scenarios and exception scenarios. Each scenario is a particular path to address the use case for the system.

In your specific example, the use case may be "search for book". The main success scenario may be what you described, but you may also have other scenarios for cases like when there are no available books or the search returns no books at all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.