softwre project test case (1) (1)
softwre project test case (1) (1)
• Scenario : Validate that passwords meet the complexity requirements defined by the security
policy.
• Steps:
1. Enter a password that does not meet the complexity requirements (e.g., less than 8
characters, no special characters).
• Expected Result: The system should reject the password and display a message indicating the
password does not meet the strength requirements.
• Steps:
• Scenario : Validate that session tokens are securely generated and managed.
Steps:
• Expected Result: The application should invalidate the session token upon logout, and reuse of
the token should be rejected.
• Steps:
• Expected Result: The system should successfully authenticate the user if the MFA code is
correct.
• Steps:
Enter a malicious payload in the username or password field (e.g., ' OR '1'='1).
• Expected Result: The system should not execute unintended SQL queries, and the login attempt
should be rejected.
• Steps:
2. Verify that hashes are generated using a strong hashing algorithm (e.g., bcrypt, Argon2)
and include salt.
• Expected Result: Passwords should be stored as salted hashes using a secure hashing algorithm.
• Scenario : Verify that error messages do not reveal details about the authentication process.
• Steps:
• Expected Result: The error message should be generic and should not reveal whether the
username or password was incorrect.
8. Test Case: Error Message Disclosure
Objective: Ensure that error messages do not disclose sensitive information.
• Scenario : Verify that error messages do not reveal details about the authentication process.
• Steps:
• Expected Result: The error message should be generic and should not reveal whether the
username or password was incorrect.
• Steps:
• Expected Result: The application should not execute the script, and the login attempt should be
rejected.
10. Test Case: Session Timeout
Objective: Verify that sessions expire after a period of inactivity.
• Steps:
• Expected Result: The user should be required to log in again after the session has expired.
11. Test Case: Password Reset Functionality
Objective: Ensure that the password reset process is secure.
• Steps:
• Expected Result: The password reset process should be secure, and the new password should be
set successfully without exposing sensitive information.
These test cases cover a broad range of security aspects related to customer account authentication. By
executing these tests, you can identify potential vulnerabilities and ensure that the authentication
process is secure and robust.
1. security Features
• Client-Side Validation:
• Server-Side Validation:
o Always validate and sanitize input on the server to prevent SQL injection and other
attacks.
• HTTPS: Ensure the page is served over HTTPS to encrypt data in transit.
• Password Field:
o If MFA is implemented, include an additional step after the initial login form.
o Provide fields for MFA codes and a submission button for verification.
o Use generic error messages like "Invalid username or password" to avoid revealing
specific details about failed login attempts.
• Account Lockout: Temporarily lock accounts after multiple failed login attempts and notify the
user via email.
How to test Authentication and
Authorization?
Authentication and authorization can be tested either manually or in an automated
way. Either way, we must create some happy scenarios and negative scenarios as
well. Although successfully testing happy scenarios is important, creating edge
cases to uncover potential flaws in design or bugs is also crucial to the overall
product quality. Let’s dive into how you can test them manually using a very basic
approach.
Test Cases for Testing Authentication
Successful Verify that users with valid credentials Enter a valid username and password, and
authentication can successfully authenticate confirm successful login
Invalid Ensure that users with invalid credentials Enter an incorrect password for a valid
credentials cannot access the system username and verify that the login fails
Account Test how the system would response to Test how the system would respond to several
locked several failed login attempts failed login attempts
Session Confirm that session management is in Click on the “Forgot Password” button, enter
management place by preventing unauthorized access the registered email, and confirm that a
password reset email has been sent.
Ensure that users can access only Log in as a regular user and attempt to
Successful authorization to a
the resources they are authorized access an admin-only page, ensuring
resource
to view access is denied
Check the system’s response if a Check the system’s response if a A regular user attempts to modify
user tries to access an user tries to access an unauthorized another user’s account information,
unauthorized resource resource ensuring the system denies access