100 Test Cases For Login Page (With Template + Detailed Guide)
Learn with AI

A Login page is more than just the entry point to a user account—it’s a key area for security, privacy, and personalization. It’s also one of the most important screens to validate during software testing or web testing. If you’re unsure where to start, here are 100 Login Page test cases you can use as references.
This article covers the most common and essential login test cases, grouped by category. A test case template is also included to help you get started quickly.
Read More: A Complete Web Testing Checklist
1. Positive Login Page Test Cases
Positive test cases verify that the Login page behaves correctly with valid inputs. Common scenarios include:
- Valid username and password successfully log the user in.
- Login using minimum allowed username and password length.
- Login using alphanumeric credentials.
- Successful login with “Remember Me” selected.
- Login with mixed-case username.
- Login using a valid email as the username.
- Login using a valid phone number as the username.
- Successful login with multi-factor authentication (MFA).
- Login with special characters in the username (e.g., @, #, $).
- Login using social media accounts (if supported).
- Login using biometric authentication.
- Login after password reset using the new password.
- Login after completing account recovery.
- Login with different localization/language settings.
- Login across different browsers (Chrome, Firefox, Edge, etc.).
2. Negative Login Page Test Cases
Negative test cases check how the Login page handles invalid or unexpected input. Common scenarios include:
- Incorrect password for a valid username.
- Incorrect username for a valid password.
- Empty username field.
- Empty password field.
- Username not found in the system.
- Password not meeting strength requirements.
- Excessively long usernames or passwords.
- Incorrect case used in username.
- Expired or deactivated account.
- Suspended account.
- Multiple failed attempts triggering lockout.
- Login after session timeout.
- Incorrect MFA code.
- Invalid characters or script injection in fields.
- Failed CAPTCHA validation.
3. Performance Test Cases for Login Page
Performance testing checks whether the Login page can handle different levels of traffic. This matters especially for high-traffic sites like ecommerce, financial services, public services, or institutions with seasonal spikes (e.g., school enrollment).
Key performance test cases include:
- Measure average login page load time.
- Load testing for max concurrent user logins.
- Measure response time during peak hours.
- Monitor server resource usage (CPU, RAM, bandwidth) during logins.
- Test performance across browsers and devices.
- Test performance on slow network connections.
- Measure recovery time after failed login attempts.
- Test performance when database is under heavy load.
- Test during simulated DDoS attacks.
- Test handling of high volumes of simultaneous login attempts.
- Measure impact of rate limiting.
- Test with different authentication methods (password, MFA).
- Test with large numbers of inactive accounts.
- Measure CAPTCHA impact on performance.
- Measure MFA code delivery time.
Read More: Performance Testing vs Load Testing
4. Security Test Cases for Login Page
The Login page is the first security barrier for most systems, controlling access and protecting user data. Security testing verifies that vulnerabilities are closed—either through in-house checks or authorized penetration testing.
Essential security test cases include:
- Test for SQL injection via username and password fields.
- Test for XSS using script injections.
- Verify HTTPS is enforced.
- Test for session fixation vulnerabilities.
- Verify passwords are hashed and salted.
- Test for clickjacking attacks.
- Check brute-force protection (lockout, rate limiting).
- Verify login page does not reveal username validity.
- Test for user enumeration attempts.
- Verify that session tokens and cookies are securely generated and stored.
- Test the security of password reset and account recovery processes.
- Evaluate the login page’s resistance to DDoS attacks.
- Test for insecure password policies (e.g., weak password requirements).
- Verify that error messages do not reveal unnecessary information (e.g., “Invalid username or password” instead of specifying which one failed).
- Evaluate the system’s compliance with relevant security standards such as OWASP Top Ten.
5. How to Test SQL Injection on a Login Page
SQL Injection occurs when malicious SQL code is inserted into a web application’s input fields to manipulate or damage the database. It remains one of the most common web hacking techniques, even decades after its discovery.
Suppose you have a login page at https://example.com/login. If the backend doesn’t properly sanitize user input, the system becomes an easy target for SQL Injection. Here’s a simple example of vulnerable Python code:
username = get_user_input()
password = get_user_input()
# Vulnerable SQL query
query = "SELECT * FROM users WHERE username='" + username + "' AND password='" + password + "'"
print(query)
This approach has two critical issues:
- The username and password fields are used without any validation or sanitization.
- The SQL query is assembled by directly concatenating user-supplied data.
Because of this, an attacker can bypass authentication with just two inputs:
- Enter a valid username (e.g., user).
- Enter the following payload in the password field:
# Attacker inputs:
username: user
password: ' OR '1'='1
# Resulting SQL query:
SELECT * FROM users
WHERE username='user'
AND password='' OR '1'='1';
The resulting query executed by the database becomes:
SELECT *
FROM users
WHERE username='user'
AND password=''
OR '1'='1';
6. Gmail Login Page Test Cases
Test cases for the Gmail Login page are similar to any other Login page:
- Verify that the Gmail login page is accessible from the Gmail homepage.
- Test login with valid Gmail account credentials.
- Test login with an incorrect Gmail account password.
- Test login with an incorrect Gmail account username/email.
- Test login with a Gmail account that has two-factor authentication (2FA) enabled.
- Verify that the “Stay signed in” option works as expected.
- Test the “Forgot password?” link for password recovery functionality.
- Test login using Google’s “Sign in with Google” option (if applicable).
- Verify that the Gmail login page supports multiple languages.
- Test responsiveness across devices (desktop, mobile, tablet).
- Check for security features such as CAPTCHA or anti-bot protection.
- Test Gmail login performance during peak usage times.
- Verify secure session management after login.
- Test the login page’s behavior when JavaScript is disabled.
- Verify the behavior of the “Create account” link for new Gmail registrations.
Read More: 100 Test Cases For Registration Page
7. Test Cases For Login Page on Mobile Application

Here we enter the domain of mobile testing, which comes with its own unique challenges. Devices vary widely in model, resolution, and mobile-specific behavior. Here are several login page test cases tailored for mobile apps:
- Test the login page layout across different mobile devices (phones, tablets).
- Verify support for both portrait and landscape orientations.
- Test login with valid credentials.
- Test login with invalid credentials.
- Test login with special characters in username and password fields.
- Test the “Forgot password?” functionality.
- Verify responsiveness across various mobile screen sizes.
- Test the “Remember Me” option.
- Test the “Stay signed in” option.
- Test login with multi-factor authentication (MFA).
- Verify integration with device biometrics (fingerprint, face ID).
- Test performance under different network types (3G, 4G, Wi-Fi).
- Test compatibility across OS versions (Android, iOS).
- Verify login behavior when the device is in airplane mode.
- Test login behavior when the device has low or limited storage.
Read More: Top API Test Cases You Should Test
8. BDD Test Cases For Login Page

BDD testing is an approach where test cases are written in simple language—usually Gherkin—so even non-technical team members can understand them. A typical BDD test uses three statements:
- Given — sets the starting context or initial state.
- When — describes the action or trigger.
- Then — defines the expected outcome.
Here are 15 Login Page test cases written in Gherkin format:
Test Case 1: Successful Login
Given a valid username and password,
When I attempt to log in,
Then I should be successfully logged into the system.
Test Case 2: Invalid Password
Given an invalid password for a valid username,
When I attempt to log in,
Then I should see an error message indicating the incorrect password.
Test Case 3: Empty Username Field
Given an empty username field,
When I attempt to log in,
Then I should see an error message indicating the username field is required.
Test Case 4: Empty Password Field
Given an empty password field,
When I attempt to log in,
Then I should see an error message indicating the password field is required.
Test Case 5: Username with Special Characters
Given a username with special characters,
When I attempt to log in,
Then I should successfully log in.
Test Case 6: Locked Account
Given a locked account due to multiple failed login attempts,
When I attempt to log in,
Then I should see an account-locked error message.
Test Case 7: Remember Me Option
Given valid credentials with “Remember Me” selected,
When I log in,
Then I should remain logged in across sessions.
Test Case 8: Multi-Factor Authentication (MFA)
Given valid credentials with MFA enabled,
When I log in,
Then I should be prompted to enter an authentication code.
Test Case 9: Password Reset Request
Given a password reset request,
When I follow the reset process,
Then I should be able to set a new password.
Test Case 10: Account Recovery Request
Given an account recovery request,
When I follow the recovery steps,
Then I should regain access to my account.
Free Test Case Template To Download
To write effective test cases, it helps to start with a test case template. We've prepared PDF, Doc, and Excel versions for easy download. Choose your preferred format below and begin documenting your test cases instantly.
Or Manage All Test Cases in Katalon TestOps
How To Automate and Improve Your Testing For Login Page With Katalon Platform

Login page testing isn’t overly complex, but it is highly repetitive. Because it’s a critical user entry point, frequent regression testing is essential. While automation is a smart strategy, building scripts from scratch and updating them after every UI change often becomes inefficient.
With Katalon Platform, you can create, manage, run, maintain, and report on all your tests in a single place, no additional tools required.
For example, the Record-and-Playback feature lets you interact with the Login page while Katalon automatically generates a complete test script. Within seconds, you have a reusable automated test.
As shown in the video below, simply click the “Make an Appointment” button and Katalon will capture the action, convert it into code, and execute it when you hit “Run”:
Even when the Login page changes, Katalon updates outdated locators automatically using its Self-healing features. Combined with its AI-powered testing capabilities, the platform provides a comprehensive, scalable, and modern approach to software quality management.
|
FAQs on Login Page Test Cases
What are the main categories of test cases to consider when testing a login page?
When testing a login page, it's crucial to cover positive test cases (valid inputs), negative test cases (invalid or unexpected inputs), performance test cases (load handling and response time), and security test cases (vulnerability checks like SQL injection and XSS).
Why is negative testing important for a login page?
Negative testing for a login page is vital because it simulates scenarios where users might enter incorrect or unexpected data, such as wrong passwords, empty fields, or non-existent usernames. This helps identify how the system responds to errors and ensures robust error handling and security.
How can I test for SQL Injection vulnerabilities on a login page?
To test for SQL Injection, you can try inserting malicious SQL code into the username or password fields. Examples include using ' OR '1'='1 to bypass login, UNION SELECT statements to extract data, or payloads that trigger SQL errors to observe system responses.
What specific considerations apply when testing a login page on mobile applications?
For mobile login pages, testing should include verifying layout on different devices and orientations, ensuring responsiveness to various screen sizes, checking performance on different mobile networks (3G, 4G, Wi-Fi), and integrating with device-specific features like biometric authentication.
Does this guide provide resources to help manage login page test cases?
Yes, the article offers a free downloadable test case template in PDF, Doc, and Excel formats. It also highlights how platforms like Katalon can help automate, manage, execute, and maintain test cases for login pages, including features like Record-and-Playback and Self-healing tests.