User Story Creation Example: Login Page with Password Validation. INVEST model.
### User Story Creation Example: Login Page with Password Validation
#### User Story Title: Secure Login with Password Validation
---
#### User Story (Using INVEST Model):
As a registered user,
I want to log in to my account using a secure password,
so that my account remains protected from unauthorized access.
---
#### Acceptance Criteria:
1. Password Requirements:
- The password must be exactly 8 characters long.
- It must include at least:
- One uppercase letter (A-Z).
- One lowercase letter (a-z).
- One numeric character (0-9).
- One special character (e.g., !, @, #, $, etc.).
- The password field should mask the input (show as asterisks or dots).
2. Error Messages:
- If the password is less than 8 characters:
"Password must be exactly 8 characters long."
- If the password does not contain an uppercase letter:
"Password must include at least one uppercase letter."
- If the password does not contain a lowercase letter:
"Password must include at least one lowercase letter."
- If the password does not contain a numeric character:
"Password must include at least one number."
- If the password does not contain a special character:
"Password must include at least one special character."
3. Alert Messages:
- On successful login:
"Login successful! Redirecting to your dashboard..."
- On failed login (invalid credentials):
"Invalid username or password. Please try again."
4. Negative Scenarios:
- User enters a password with 7 characters.
- User enters a password with no uppercase letter.
- User enters a password with no special character.
- User enters a password with no numeric character.
- User enters a correct password but an incorrect username.
- User leaves the password field blank.
---
#### INVEST Model Breakdown:
1. Independent:
The user story is self-contained and does not depend on other stories. It focuses solely on the login functionality with password validation.
2. Negotiable:
The specifics of the password requirements (e.g., 8 characters, alphanumeric, etc.) can be discussed and adjusted with stakeholders based on security needs.
3. Valuable:
The story provides value to the user by ensuring their account is secure and to the business by reducing the risk of unauthorized access.
4. Estimable:
The development team can estimate the effort required to implement password validation, error handling, and alert messages.
5. Small:
The story is small enough to be completed within a single sprint. It focuses on a specific feature (password validation) without being overly complex.
6. Testable:
The acceptance criteria are clear and testable. Test cases can be written to verify each scenario (e.g., password length, character types, error messages).
---
#### Benefits of Using the INVEST Model:
1. Clarity:
The INVEST model ensures the user story is clear and understandable for both the development team and stakeholders.
2. Focus on Value:
By emphasizing value, the story aligns with user needs and business goals (e.g., security).
3. Feasibility:
The story is small and estimable, making it easier to plan and execute within a sprint.
4. Testability:
Clear acceptance criteria and negative scenarios make it easy to write test cases and ensure the feature works as expected.
5. Flexibility:
The negotiable aspect allows for adjustments based on feedback or changing requirements.
---
#### Example Scenario:
Scenario 1: Valid Password
- Given the user is on the login page,
- When they enter a valid username and a password that meets all requirements (e.g., "Passw0rd!"),
- Then they should see the message: "Login successful! Redirecting to your dashboard..."
Scenario 2: Invalid Password (Missing Uppercase Letter)
- Given the user is on the login page,
- When they enter a password without an uppercase letter (e.g., "passw0rd!"),
- Then they should see the error message: "Password must include at least one uppercase letter."
Scenario 3: Invalid Username
- Given the user is on the login page,
- When they enter a correct password but an incorrect username,
- Then they should see the alert message: "Invalid username or password. Please try again."
---
This example demonstrates how to create a user story using the INVEST model, ensuring it is clear, valuable, and testable. It also highlights the importance of considering negative scenarios and error handling to deliver a robust feature.
Comments
Post a Comment