6. Negative Test Cases
Negative test cases explore how the login page behaves when incorrect, incomplete, or
unexpected data is entered. A robust system should not only reject invalid attempts but also
guide the user with clear, actionable error messages.
Test Case 1: Blank Username and Password
●Test Case ID: TC-Login-006
●Scenario: Verify behavior when both fields are left empty.
Steps:
1.Open the login page.
2.Leave the username and password fields blank.
3.Click on the Login button.
Expected Result: The system should display a validation error such as “Username and
Password cannot be empty”. No login attempt should be processed.
Test Case 2: Invalid Username with Valid Password
Sometimes, users mistype their username but remember their password.
●Test Case ID: TC-Login-007
●Scenario: Attempt login with a nonexistent username and a correct password.
Steps:
1.Enter
[email protected] in the username field.
2.Enter the correct password for a different valid account.
3.Submit the login form.
Expected Result: Login should fail with a message like “Invalid username or password.”
Test Case 3: Valid Username with Wrong Password