What is a use case? Definition, usefulness and examples

By Indeed Editorial Team

Updated 23 November 2022 | Published 7 December 2021

Updated 23 November 2022

Published 7 December 2021

The Indeed Editorial Team comprises a diverse and talented team of writers, researchers and subject matter experts equipped with Indeed's data and insights to deliver useful tips to help guide your career journey.

If you're pursuing a career in software engineering, it's important that you understand how a use case can aid the development process. You can then predict how external actors may use a system to perform a set task, before altering its design to aid this goal. By reading our guide, you may learn how to properly integrate this method into your work routine. In this article, we define use case, detail the utility of this process, explain how to create them and provide two examples.

What is a use case?

Use case (UC) is a step-by-step guide detailing how external actors might use software to achieve a particular aim. By creating a UC, you may ensure your software product responds to external direction in a predictable and human way.

You may also want to create several UCs when developing new technologies, to account for their multiple uses. For example, if you're developing a new gaming application, you might develop several different cases, each discussing a single aspect of the product. You may draft one UC plan detailing how players might interact with in-game purchase mechanisms. You may also create a UC detailing how an external actor can use the application to pass new levels. By drafting several UCs, you might ensure your application functions as expected, boosting its commercial competitiveness.

Related: How to become a software architect: definition and steps

How is UC useful to software development?

If you're developing new software, you can create UCs to understand how software might perform set functions, alongside rectifying potential errors. The following section offers four reasons explaining the utility of UCs:

1. Instil certainty

By drafting several UCs during development, you may gain more control over the final outcome of your product's development. If you're clear about the functions you want the software to perform, colleagues may be more able to devise solutions to reach these goals. You can then leave them to perform development duties autonomously, creating a quality product in a relatively short period of time.

2. Maximise profits

If you identify potential flaws before the development process ends, you might avoid withdrawing a product from sale to rectify them. Your firm might then more easily earn a reputation for designing quality products, increasing its competitiveness relative to commercial rivals. You might also be able to invest more money in developing further products, maximising long-term profits.

3. Setting clear goals

You might also utilise UCs to better define the functions that you want a product to perform. You might then focus on ways to ensure it performs these core functions well, boosting its overall utility to consumers. For example, when creating a banking app, you may devise mechanisms to give customers more control over their money, such as spending limits or fraud alerts. By carefully planning such functions in advance, you can predict how customers might use these features to plan their budgets, alongside identifying possible security flaws before commercial release.

Related: How to Develop SMART Goals (With Examples)

4. Plan upgrades

Besides designing an initial product, you can also create UCs to plan for future software upgrades, such as improved security measures. By regularly improving your product, you can ensure that it remains relevant to consumers as market trends change. You can then avoid starting again from scratch if a product is initially unsuccessful. For example, after releasing a video communications application, you might ask consumers for feedback about its features, such as its user interface. You can then create additional UCs to plan ways of rectifying any issues, to improve the application's overall usability.

How might you create a use case?

The following section provides a step-by-step guide to creating a UC:

1. Understand the system(s) and actions involved

Before you draft a UC, it's important that you understand the system and actions involved in performing a set function. You may then adapt your plan to suit the specific circumstances of a scenario. For example, if you're explaining how to transfer funds to another current account via a banking application, you can explain you carry this process out. In this scenario, an external actor is a private person or business employee, completing a financial transaction. The systems involved are both the application itself and the two current accounts.

Related: How to write a use case (with definition and helpful tips)

2. Create an actionable title

It's important that you create an actionable title so that colleagues can clearly understand how to use your written plan to create a high-quality application. You may begin the title with a verb, to more narrowly define the steps you wish a developer to take. For example, if you're outlining the process of purchasing credits for a gaming application, you might use terms such as buy or acquire. By using these terms, you outline a direct course of action that colleagues can follow.

3. Explain what might trigger a function

You can briefly outline the conditions that might exist before a function can take place. You might discuss the actions that external actors carry out before triggering the function, before detailing why this is the case. For example, if you're designing a social media platform, you might explain the conditions that might encourage a user to post a picture or video online.

4. Explain how you intend a function to work

After including background information, you might use bullet points to concisely explain how you expect the function to occur. You may include more detailed directions in this section, to ensure colleagues understand how you want actors to interact with the system. For example, if you're outlining steps individuals might take when formatting a written document, you might include the actual names of relevant tabs, such as layout or formatting. By doing so, you can ensure the end product properly reflects your creative vision.

Related: Why testing in software engineering is essential (6 reasons)

5. Explain other potential outcomes

After outlining a function's expected processes, you might also mention how you want the function to respond in crises, such as a systems failure. You might briefly outline the concepts of alternative and exception flows, before providing an example of each failure. The former concept might offer ways of rectifying any mistakes, whereas the latter might discuss how the system can respond to incorrect outcomes. By planning for system errors in advance, you can learn how to more easily overcome serious problems.

You might also briefly discuss the system's conditions after external actors perform the function successfully. Here you outline what the actor does upon completing the process, which is usually performing the function as they originally intended.

6. Create a UC diagram

It's also important that you complement the UC with a diagram, such as a flow chart or a brainstorming diagram. By taking this approach, you might use visual images to make a function's step-by-step completion process easier to understand. You can also show colleagues how you reached this conclusion so that they're aware of the logic behind your preferred process.

Related: Use case diagrams examples (with definition and tips)

Use case examples

You might tailor UCs to suit certain conditions, such as the type of system you're designing. The section below provides two templates that you might follow when drafting a UC:

Example one

You can follow this example if you're drafting UCs for social media-related applications or websites. You may structure this template as follows:

Title: Posting an image on social media
Social media team

Description: The user wishes to upload an image of their children onto their social media feed. The process begins when the user logs in to their social media account. The process ends if the user successfully uploads the image.

Actor: Private user

Trigger: The user selects an image to upload.

Preconditions: The user logs into their account.

Expected process:

  • Step one: The user selects the 'login' icon, before entering their user name and password.

  • Step two: The user selects the 'upload image' icon, before accessing their picture files.

  • Step three: The user selects the 'upload' icon on their picture files.

  • Step four: The image appears on the user's feed.

Alternative process: Upon selecting the 'upload image' icon, the user sees the 'messages' section instead.

Exception process: Upon selecting the upload image icon, the user's files fail to appear.

Post-function conditions: The image is uploaded.

Example two

You might follow this template if you're drafting UCs to design word processing software. You structure this template as follows:

Title: Formatting images on a written document
Technical team

Description: The user wishes to include images on a written document, before moving them to the optimal section of a page. The process begins with the user opening the document. The process ends when the user is able to appropriately format the image.

Actor: Private user

Trigger: The actor selects an image to format.

Precondition: The user opens the written document.

Expected process:

  • Step one: The user opts to 'copy' the image, before using 'paste' to add it to the written document.

  • Step two: The user selects the 'formatting' tab, before selecting the 'images' drop-down icon.

  • Step three: The user browses the formatting options, before opting for their preferred method.

  • Step four: The user moves the formatted image to the appropriate area of a page.

Alternative process: Upon selecting the 'formatting' tab, the user sees the 'layout' section instead.

Exception process: Upon selecting the 'formatting' tab, the 'images' icon fails to appear.

Post-function conditions: The image is formatted.

Related articles

What is software engineering and what does it involve?

Explore more articles