Skip to main content

What is a use case?

A use case is a description of how a user interacts with a system to achieve a specific goal. It shows the scenario of using the product through the user's eyes, not the developer's.

Essence

A use case answers a simple question: "What does the user do, and what should the system respond with?" It is not about the interface and buttons, but about the logic of interaction - step by step. For example: "The user resets a password via email" is a separate use case.

Main elements of a use case

  1. Actor - the one who interacts with the system. This can be a person (user, administrator) or another system (API, database).
  2. Goal - what the actor wants to achieve: register, pay for an order, download a report.
  3. Main Flow - the sequence of steps when everything goes according to plan. Example:
  4. the user enters a login and password,
  5. the system checks the data,
  6. the system opens the personal account.
  7. Alternative / Exception Flows - what happens if something goes wrong. Example: the user entered a wrong password → the system shows an error.
  8. Preconditions - what must be true before the scenario starts. For example, the user must be registered.
  9. Postconditions - what happens after the scenario completes successfully. For example, the user is authorized and sees the home page.

Use case example

Name: Password recovery Actor: User Precondition: The user is registered Main flow:

  1. The user clicks "Forgot password?"
  2. Enters their email
  3. The system sends an email with a recovery link
  4. The user follows the link and enters a new password
  5. The system saves the password and reports success Alternative flow:
  • If the email is not found, the system reports an error.

Why use cases are needed

  • They help understand the system's behavior before it is implemented.
  • They simplify communication between business and developers - everyone sees the same scenario.
  • They form the basis for test cases and technical requirements.

Conclusion

A use case is a tool that describes the "user ↔ system" interaction through real scenarios. It helps all project participants understand equally what the system does and why, before coding begins.

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.