How to Write Test Cases for Login Page in 2026? A Practical Guide
A login page is one of the initial points of interaction between a user and a system and definitely one of the most significant ones. Web and mobile apps, e-commerce platforms, and a variety of other software solutions offer only limited functionality to unlogged users. A person needs to register and enter to access the core features that make the essence of software and its value.
In 2026, the login experience has evolved to include biometric authentication, Multi-Factor Authentication (MFA), and passwordless entries. As an experienced web app testing company, we have observed that even a minor defect here can lead to massive user churn and security vulnerabilities. Professional manual software testing remains the gold standard for verifying these high-stakes user journeys.
What does it mean for QA specialists? Working on test cases for a login page requires being as meticulous as you can. If you need some help with this task, here’s a short guide on test case writing.
What Are the Different Formats of Test Cases?
A couple of things can influence your choice of the test case format. Firstly, the more complex functionality is, the more details you will need to include in a test case. Secondly, the format can be dictated by the configurations of test case management software your team uses. Finally, it can depend on the generally accepted practices within a QA company or a development team.
Choosing a standardized format is particularly important when you decide to QA outsource. It ensures that internal developers and the dedicated QA team are speaking the same language, which is vital for maintaining speed in a CI/CD pipeline.
If you don’t use any test management software, you can write test cases in Google Spreadsheets or Microsoft Excel. You’ll find an example of the formatting further in the article.
It is better to clarify which format to use before you start writing test cases. It can save you a lot of time.
Utilizing professional software testing services often means gaining access to pre-built templates and high-end QA resources that simplify this documentation process. This is especially useful for mobile app testing, where device-specific test cases can become quite complex.
Which Test Case Examples Should You Follow?
Test Case Example #1: UI and Layout Verification
At the very beginning, we need to make sure that the login page looks like it is intended to look. Let’s suppose everything is fine and there are no UI defects. Then, you can get a test case that looks like this.
ID
LP-1 (LP for Login Page, 1 as an ordinal number)
Summary
Check Login Page displaying.
Steps
- Open front end (or: open the website + active link).
- Proceed to the login page.
- Pay attention to the page layout.
Expected results
The login page opened.
The page looks as expected.
Actual results
The login page opened.
The page looks as expected.
Status
Passed
Now, let’s imagine things aren’t that good, and there is a bug. In this situation, everything in your test case will remain the same, except for two last clauses – actual result and status. It can go like this:
Actual results
The login page opened.
The label text overlaps with the input field.
Status
Failed.
Or like this:
Actual results
The login page didn’t open.
Status
Blocked.
As you can see, the wording will depend on what actually happens at this stage.
In 2026, mobile QA experts pay extra attention to how login pages adapt to foldable screens and varying resolutions. A mobile app testing company will always check these visual elements on real devices to ensure brand consistency.
Test Case Example #2: Navigation and Links
Test cases have slightly different names of clauses they include or a different sequence of those clauses. You can find an example below. Let’s start with bug-free functionality again.
Test #
LP-2
Test description
Check top navigation for a logged-in user.
Inputs
- Open front end.
- Log in as a registered user.
- Check links in the header of the page.
- Try to open the My Account section.
Expected Output
A logout link is displayed for a logged-in user.
A logged-in user can open the My Account section.
Pass/Fail
Pass
If there is a bug, you add one more clause at the end and describe what happens:
Defect
A logged-in user can’t open the My Account section.
Or:
A logout link is not displayed for a logged-in user.
If you are using test automation services, these types of navigational checks are prime candidates for automating regression testing. This allows your team to focus on more complex security scenarios.
Test Case Example #3: Advanced Conditions and Priority
Some cases require preconditions (actions to perform before executing a test case) and postconditions (actions that return the system to its initial state). Sometimes software testers also decide to include priority in their test cases. Thus, you can end up with yet another format of this test artifact:
- Preconditions.
- Summary.
- Priority.
- Steps.
- Expected result.
- Postconditions.
Given the importance of a login page, the majority of test cases for login page will have a high priority. Here’s an example of a test case with preconditions, postconditions, and priority included.
Test Case #3
Preconditions
A user is logged into the system.
Summary
Check the Back button.
Priority
Medium.
Steps
- Log out of the system.
- Click the Back button.
Expected result
The user is not logged. The login page is displayed.
Postconditions
To access the features for logged-in users, a user has to log in again.
Download all 3 test case examples (PDF)
All the test case examples shared above are correct and frequently used. Moreover, you can be certain to discover even more variations of test case formats. Once again, if it’s your first time creating test cases, specify the details with other team members. If you are studying or working on a test task, go with the most detailed test case or mix several, showing that you are aware of the variations 😉
What Is the Essential List of Test Cases for a Login Page?
All the login pages are more or less the same. There will be slight differences in design, but they don’t affect the approach to test case writing fundamentally. Nielsen Norman Group’s research on login walls found that users are rarely more annoyed than when a site demands a login before showing anything, though it notes that highly personal applications such as banking are justified in requiring one.
We won’t write a test case example for every possible user input here. Instead, we’ll share some ideas that will make test case writing easier. Below, you will find summaries that can become the background for test cases for your project. We’ll include the Forgot Password summaries, too, though technically, you can distinguish them as a standalone group of test cases.
Positive Test Cases for Login Page
- Log in with valid credentials.
- Check the Show Password feature.
- Check the Remember Me checkbox.
- Check the autofill.
- Check the Log Out button.
- Restore the password with a registered email.
- Check the Forgot Password email.
- Create a new password using valid data.
- Log into the account using a new password.
- Switch between input fields using Tab.
- Log into the system using the Enter button.
- Log in with valid credentials in different browsers.
- Log in with valid credentials using different devices.
- Check biometric login (FaceID/TouchID) for mobile apps.
- Verify Multi-Factor Authentication (MFA) code acceptance.
Negative Test Cases for Login Page
- Log in with empty required fields.
- Log in with an invalid email.
- Login with an unregistered email.
- Log in with an invalid password.
- Log in with both email and password invalid.
- Restore a password with an invalid email.
- Restore a password with an unregistered email.
- Restore a password with empty required fields.
- Restore a password using non-matching new passwords.
- Log in to the account using an old password.
- Verify system behavior after multiple failed login attempts (Lockout).
- Check for SQL injection vulnerabilities in login fields
Read Top E-Commerce Test Cases
Several of these cross from functional testing into security testing. Injection, lockout and enumeration through error messages all need a dedicated pass, which is what our security testing services provide.
Optimize Your Testing Today
Ready to level up your quality? From test automation services to full-scale software testing outsourcing, we help you build a product that is extraordinary.
Login Security Checks Every QA Team Should Run
A login page is the most attacked surface in most applications, and 6 checks belong in every test plan. OWASP Top 10:2025 ranks A07:2025 Authentication Failures as the seventh most critical web application security risk.
➛ Rate limiting and brute force. Verify that repeated failed logins are throttled. OWASP’s Authentication Cheat Sheet describes the 3 settings to check: the lockout threshold, the observation window and the lockout duration. It also warns that lockout itself can be abused: “care must be taken to prevent it from being used to cause a denial of service by locking out other users’ accounts”.
➛ Account lockout behaviour. OWASP recommends tying the failed-attempt counter “to the account itself, rather than the source IP address”. Test both. Locking per IP lets an attacker rotate addresses. Locking per account lets them lock out your users deliberately.
➛ Error message wording. This is the check most teams miss. OWASP states that an application “must respond with a generic error message regardless of whether: The user ID or password was incorrect. The account does not exist. The account is locked or disabled.” A07:2025 gives the pattern: use “the same messages for all outcomes (‘Invalid username or password.’)”. Response time counts too. A slower reply for a real account leaks the same information.
➛ Injection in the form fields. SQL injection and cross-site scripting both belong in the negative test list, which the section above already covers. Verify the input is rejected rather than escaped into a database query.
➛ Session management. Check session timeout. Confirm that logout invalidates the session server-side, and that the back button afterwards does not restore access.
➛ Password reset and MFA. Reset links should expire, work once, and not reveal whether an email exists. For MFA, check that codes expire and that a failed attempt counts toward the lockout threshold.
On password rules, the official guidance has reversed. NIST SP 800-63B states that verifiers “SHALL NOT impose other composition rules (e.g., requiring mixtures of different character types) for passwords”. It also says they “SHALL NOT require subscribers to change passwords periodically”. OWASP A07:2025 agrees: “Once considered best practices, password rotation and complexity requirements encourage users to both reuse passwords and use weak passwords.” If your test cases still assert a capital, a digit and a symbol, they test against outdated guidance.
For a deeper pass, OWASP’s Web Security Testing Guide sets out 10 authentication tests, from default credentials to weak lockout mechanisms. Running those properly is specialist work, and it is what our security testing services cover.
Security work on regulated products usually goes wider than the login form. On a cybersecurity assessment for a bank in a GCC country, our team ran external and internal penetration tests alongside a gap audit and a phishing simulation, mapping over 70 major risks.
Tools for Automated Login and Authentication Testing
3 categories of tool cover login testing, and most teams need at least 2.
➛ UI automation: Selenium or Playwright. Both drive a real browser through the login form. Playwright adds a useful feature for this specific job: storageState saves an authenticated session to a file, so later tests reuse it. Its documentation notes this “eliminates the need to authenticate in every test and speeds up test execution”. It also warns that the state file “may contain sensitive cookies and headers” and should not be committed to a repository.
➛ API authentication: Postman or REST Assured. Testing the authentication endpoint directly is faster and less brittle than driving the UI. Postman documents API key, Bearer token, JWT, Basic, Digest and OAuth 2.0 flows. REST Assured supports “OAuth, digest, certificate, form and preemptive basic authentication” from Java.
➛ Security testing: ZAP or Burp Suite. ZAP is free and open source. Burp Suite has a free Community Edition and a paid Professional edition. Both intercept and replay requests, which is how you test for injection, session handling and authentication bypass.
1 naming note. ZAP is no longer an OWASP project. Its own documentation states that “the ZAP Team regrettably had to take ZAP out of OWASP in September 2023”. It adds that “if you see a reference to ‘OWASP ZAP’ then you know that the source is out of date”. It is now ZAP by Checkmarx.
Want to make sure your login and authentication flows are secure before release? Talk to our team about covering them.
Manual vs. Automated Testing for Login Flows
Login is the highest-traffic flow in most products, which makes it the first candidate for automation and the last place you can afford a gap. Split the work by what changes and what does not.
| Check | Automate | Keep manual | Why |
|---|---|---|---|
Positive login regression | ✓ | Runs every release, same inputs, same expected result | |
Negative cases: invalid email, wrong password, empty fields | ✓ | Deterministic and high-volume. Ideal automation candidates | |
Field validation and error messages | ✓ | Stable rules, easy assertions | |
Account lockout after failed attempts | ✓ | Deterministic once the threshold is known. Needs test data reset | |
Session timeout and logout | ✓ | Scriptable with controlled waits | |
UX of a new login design | ✓ | Nobody can assert “this feels confusing” | |
Biometric login: FaceID, fingerprint | ✓ | Needs real devices and real sensors | |
CAPTCHA | ✓ | Designed to defeat automation. Disable it in test environments instead | |
SSO with an external provider | ✓ | Depends on a third party you do not control, and breaks unpredictably | |
MFA code delivery | partly | Automate the code entry; verify delivery by SMS or authenticator manually |
The practical rule: automate everything with a known expected result. Keep a human on anything depending on judgement, hardware or a third party. Teams that automate CAPTCHA and SSO end up with the flakiest suite in the company.
Our web application testing services cover both halves of that split.
To Sum Up: How Does a Professional QA Company Approach Login Testing?
The login page is often the foundation for the core features. If it doesn’t function properly, a software product/service becomes pretty much useless. For many enterprises, software testing outsourcing is the most efficient way to handle this complexity. By using outsourced testing, you gain access to a broad device lab and deep security expertise.
Whether you rely on manual software testing or automation testing services, the goal is the same: a secure, seamless entry for every user. In practice that means 2 passes. Functional coverage of the flows above, through web application testing, and a separate look at lockout, enumeration and session handling through security testing.
Want to make sure your login and authentication flows are secure before release? Talk to our team.
FAQ
A specialised QA company has the experience to identify edge cases such as session timeouts, lockout bypasses and enumeration through error messages, which internal teams often overlook because they know how the system is supposed to behave. A dedicated QA team brings that outside view plus a device lab for biometric and cross-browser checks.
It requires real physical devices, because simulators do not reproduce how the software interfaces with FaceID or fingerprint sensors. That is one reason biometric login stays manual, and why our mobile application testing services run on a real device lab.
Login is a high-frequency action. Automating it ensures that new updates don’t accidentally “lock out” your entire user base.
Both, split by what changes. Automate positive and negative regression, field validation, lockout behaviour and session timeout. Those have known expected results and run every release. Keep UX review, biometric login, CAPTCHA and third-party SSO manual, since they depend on judgement, real hardware or systems you do not control. Our automated testing services cover the first half.
6 checks. Rate limiting and brute-force protection. Account lockout. Generic error messages that do not reveal whether an account exists. Injection testing on the input fields. Session management including logout. And password reset plus MFA handling. OWASP’s Web Security Testing Guide sets out 10 authentication tests in detail.
Selenium or Playwright for the UI. Playwright’s storageState lets tests reuse an authenticated session instead of logging in each time. Postman or REST Assured for the authentication API, both supporting OAuth 2.0, Bearer tokens and Basic auth. ZAP or Burp Suite for security checks such as injection and session handling.