User stories

14/01/2025

A user story is a short, simple description of a feature or functionality written from the perspective of an end-user or customer. It helps the development team understand the requirements and ensures the focus remains on delivering value.

Structure of a User Story

A user story typically follows this format:

As a [user role], I want[goal/feature] so that [reason/value].

  • As a: Defines the role of the user (e.g., customer, admin, manager).
  • I want: Describes what the user wants to achieve or the feature needed.
  • So that: Explains the value or reason behind the request.

Example User Stories

For an E-commerce Website:

  • As a customer, I want to filter products by price so that I can find items within my budget.

For a Banking App:

  • As a user, I want to view my account balance in real-time so that I can manage my finances effectively.

For a Project Management Tool:

  • As a team leader, I want to assign tasks to team members so that responsibilities are clear.

Detailed User Story: An Example for a Banking Application

User Story:
As a customer, I want to transfer money to another account so that I can pay my bills or send money to others.

Details of the User Story

1. Description

This user story focuses on the customer's ability to transfer funds from their account to another account seamlessly.

2. Acceptance Criteria

Define the conditions under which the user story will be considered complete.

Account Selection:

  • The user must be able to select their account from a list of accounts they own.
  • The account balance is displayed next to the account name.

Recipient Details:

  • The user must enter or select the recipient's account details (name, account number, and bank).
  • If the recipient is already saved as a beneficiary, the user can select them from a list.

Transfer Amount:

  • The user must input the amount to be transferred.
  • If the amount exceeds the available balance, an error message is displayed.

Confirmation Screen:

  • The user must see a summary of the transfer details (sender, recipient, amount, transfer fees, and total amount).
  • The user must confirm or cancel the transfer.

Transaction Status:

  • After confirmation, the user sees a success or failure message.
  • A unique transaction ID is provided for reference.

Notifications:

  • The user receives a confirmation email or SMS for the transaction.

Error Handling:

  • If the transfer fails, an appropriate error message is displayed, and the user is advised on the next steps.

3. Priority

High – This feature is critical for user satisfaction and aligns with the core functionality of the banking app.

4. Estimation

Effort Level: Medium (estimated 8–13 story points based on complexity and integration requirements).

5. Dependencies

  • Integration with payment gateway and third-party banking APIs.
  • Availability of recipient management functionality.
  • Adequate security measures for transaction authentication.

6. Risks

  • Potential delays due to API integration issues.
  • Risk of unauthorized transactions if security measures are inadequate.

7. Technical Notes

  • Use two-factor authentication (2FA) for confirming transactions.
  • Encrypt sensitive data (account numbers, transfer amounts) during the process.
  • Ensure compliance with financial regulations (e.g., PSD2, AML).

8. Story Mapping

Epic: Money Transfer

  • User Story: Transfer money to another account.
  • Sub-Tasks:
    1. Create UI for selecting sender and recipient accounts.
    2. Implement backend logic for validating account details.
    3. Develop confirmation screen and success/error messages.
    4. Integrate with notifications system for alerts.

9. Testing Scenarios

  • Validate that the user can select accounts and input transfer details.
  • Test different transfer amounts, including edge cases (e.g., zero or negative values).
  • Ensure notifications are sent for successful transactions.
  • Simulate transaction failures and confirm appropriate error messages.

This level of detail ensures that the development team has all the necessary information to deliver a high-quality, user-focused feature. 

Epics and User Stories

In Agile software development, both Epics and User Stories are tools used to break down and organize the work that needs to be done. However, they serve different purposes and are used at different levels of granularity:

1. Epic

  • Definition: An Epic is a large body of work that can be broken down into smaller tasks or user stories. It represents a significant feature, capability, or initiative in the product, which usually cannot be completed in a single iteration (sprint).
  • Size: Epics are large and high-level, often spanning multiple sprints or even releases.
  • Purpose: They provide a broad overview of a feature or functionality. They help to group related user stories and provide context for teams and stakeholders.
  • Timeframe: Epics typically take longer to complete than user stories. They could take multiple months to complete depending on the size and scope.

Example of an Epic:

  • As a customer, I want to be able to track my order status so that I can know when my product will arrive.

2. User Story

  • Definition: A User Story is a small, actionable unit of work that describes a specific functionality from the user's perspective. It is a concrete deliverable that can be completed within a single sprint.
  • Size: User stories are much smaller than epics and are meant to be completed within one iteration.
  • Purpose: They are used to clearly articulate the needs of the user and help the development team understand what is to be built.
  • Timeframe: Typically completed within a sprint (usually 1–4 weeks).

Example of a User Story:

  • As a customer, I want to receive email notifications when my order is shipped so that I can track the delivery progress.

Key Differences:

  • Granularity: Epics are larger and more abstract; user stories are smaller and more detailed.
  • Scope: Epics span multiple user stories, whereas user stories are specific features or functionality.
  • Time: Epics typically take longer to complete, while user stories are designed to be completed within a sprint.

Relationship:

  • Epics are broken down into smaller user stories, which are then tackled by the development team in the sprint. This breakdown ensures that larger, complex features are managed in a structured way, making them easier to implement.

In summary, Epics provide a broad vision for a feature, while User Stories define the specific functionality that needs to be developed within that feature.

3 C's of User Stories

The 3 C's of User Stories is a concept that helps teams ensure that user stories are well-defined and effective. The 3 C's stand for:

1. Card

  • Definition: The user story is written on a physical or digital card (or as a text entry in a tool), representing the work to be done.
  • Purpose: It serves as a reminder and communication tool for the team.
  • Content: The card typically includes the title, a brief description, and any relevant information (e.g., acceptance criteria, priorities).
  • Example: A simple card might say, "As a user, I want to log in with my email so that I can access my account."

2. Conversation

  • Definition: The conversation refers to the discussions and clarifications between the product owner, stakeholders, and the development team to refine the user story.
  • Purpose: The conversation helps to ensure that all parties understand the details of the story and any requirements or constraints.
  • Content: This includes ongoing discussions around functionality, technical details, acceptance criteria, and other clarifications as the team works on the story.
  • Example: A conversation could include questions like "What happens if the user forgets their password?" or "Should we allow multiple login attempts?"

3. Confirmation

  • Definition: Confirmation involves defining the acceptance criteria or conditions that must be met for the user story to be considered complete.
  • Purpose: It ensures that the team knows when the story is done and helps verify that the solution works as intended 

The INVEST acronym

The INVEST acronym is a set of criteria that help ensure user stories are well-formed and effective in an Agile environment. It stands for:

1. Independent

  • Definition: A user story should be self-contained and independent, meaning it can be developed, tested, and delivered without relying on other user stories.
  • Why it matters: Independent stories can be worked on in parallel, ensuring the team doesn't face dependencies that slow down progress.
  • Example: "As a user, I want to update my profile picture so that I can personalize my account."

2. Negotiable

  • Definition: User stories are not set in stone. They should allow room for discussion and negotiation about the details, priorities, and how the feature will be implemented.
  • Why it matters: This flexibility ensures that the team and stakeholders can adjust the scope or details of a story as needed.
  • Example: The story "As a user, I want to reset my password" may initially be simple, but the team can negotiate additional requirements like email notifications or security questions.

3. Valuable

  • Definition: Each user story should deliver value to the user or the business. If a story doesn't provide any tangible benefit, it's worth rethinking.
  • Why it matters: This ensures that the team focuses on delivering meaningful features that matter to the customer and help achieve business objectives.
  • Example: "As a user, I want to receive notifications when my order is shipped so I can track its progress" delivers value to the user by keeping them informed.

4. Estimable

  • Definition: The user story should be clear and well-defined enough that the team can estimate how much effort or time it will take to complete.
  • Why it matters: This ensures that the team can plan and allocate resources effectively.
  • Example: A vague story like "As a user, I want a better UI" is hard to estimate. It needs to be broken down into more specific stories, like "As a user, I want the login screen to load within 2 seconds."

5. Small

  • Definition: A user story should be small enough to be completed within a single iteration or sprint (usually 1–2 weeks).
  • Why it matters: Smaller stories are easier to manage, test, and complete in the time frame of a sprint.
  • Example: Instead of "As a user, I want a complete account management system," break it down into smaller stories, such as "As a user, I want to change my email address" or "As a user, I want to reset my password."

6. Testable

  • Definition: The user story should have clear acceptance criteria that allow the team to verify that the feature works as expected.
  • Why it matters: Testability ensures that there's a clear definition of "done" and that quality is maintained.
  • Example: For the story "As a user, I want to change my email address," the acceptance criteria could include:
    • "User can input a new email address."
    • "The system sends a confirmation email to the new address."
    • "The new email address appears in the user profile."