DA3. scenarios vs. use cases¶
statement¶
What is the difference between a scenario and a use case? When do you use each construct? Explain with the help of 1-2 suitable examples.
solution¶
- A use case describes how the user will use the planned system to accomplish business goals. A scenario is a description of how the system will be used.
- A use case involves an actor (which can be a human, a physical device, or another system), a responsibility for this actor to achieve a goal. The actor will use the planned system to achieve the goal; thus, the responsibility is satisfied (served) then the use case is resolved.
- The planned software resolves the use case in different paths (ways); each is a use case scenario.
- A use case scenario is a detailed use case; where the actors, goals, actions, time, and contexts are described in detail. A single use-case can have multiple scenarios depending on the available contexts for this use case (different actors involved in this use-case, different times where the use-case may be useful …etc.).
Example 1¶
- A good example would be The user sign-in into a system using the login panel.
- Use case: the user will use the system to sign in to access their account or to perform some registered-users-only actions.
- Use case scenario: the path the user will follow till they reach the private area (registered-users-only area).
- some possible scenarios for this case:
- Admins can use the login panel, then enter their email/password (admin-login, email/password).
- Users can use the login panel, then enter email/password (user-login, email/password).
- Admins can use the login panel, then enter a phone number, a shortcode should be sent by SMS, and the user has to enter this shortcode to verify their identity (admin-login, phone number).
- Users can use the login panel, a shortcode should be sent by SMS, and the user has to enter this shortcode to verify their identity (user-login, phone number).
- Users can use the login panel and their Facebook account to log in. The backend should contact Facebook servers to verify user email, then identify users based on our databases. (user-login, Facebook).
- Users can use the login panel and their Google account to log in. The backend should contact Google servers to verify user email, then identify users based on our databases. (user-login, google).
- Users can use the login panel and their Twitter account to log in. The backend should contact Twitter servers to verify user email; then identify users based on our databases. (user-login, Twitter).
- Users can use the login panel and their Linkedin account to log in. The backend should contact Linkedin servers to verify user email; then identify users based on our databases. (user-login, Linkedin).
Example 2¶
- Accessing the Games feed in a Football matches tracking system.
- Use case: access the history of games played by a team.
- Use case scenario: the path the user will follow till they reach the games feed.
- possible scenarios for this use case:
- Users can use the mobile app and access the games’ feeds (access feed, user, mobile app).
- Admins can use the internal content management system (CMS) and access the games’ feeds (access feed, admin, CMS).
- Admins can use the internal CLI (command line interface) and access the games’ feeds (access feed, admin, CLI).
references¶
- Marsic, I. (2012). Software engineering. Rutgers Unversity. https://www.ece.rutgers.edu/~marsic/books/SE/book-SE_marsic.pdf
- Arms, W. (n.d). CS 5150 Software Engineering. Cornell University. https://www.cs.cornell.edu/courses/cs5150/2014fa/slides/D2-use-cases.pdf
- Cordova, M. (2020). Understanding Use Cases, Use Case Scenarios, User Stories, Flow Charts. https://www.krasamo.com/understanding-use-cases-use-case-scenarios-user-stories-flow-charts/