30 test cases for a login screen
Do not miss this exclusive book on Binary Tree Problems. Get it now for free.
In this article, we have listed and explained 30 test cases for the most important feature of any web app that is a login screen. This is an important question for Software Developer positions.
Table of contents:
- Login screen
- 30 Test cases for a login screen
Login screen
Login screen is a webpage from which an user can login to their account in the specific web application. A minimal login screen has the following components:
- A field to enter email address or mobile number or username
- A field to enter password
- A CAPTCHA to solve
- A button to submit the login details
- A button or link to reset password or forgot password feature
- A button or link to create an account (in case user does not have an account and somehow, landed on the login page)
On submitting, the page should be able to successfully verify the login details, enable the user to login and land on a specific page of the web application.
Any feature need extensive test cases to ensure there is minimal unexpected errors.
30 Test cases for a login screen
Following are the 30 Test cases for a login screen:
- Verify that the login screen is displayed when the application is launched.
- Verify that the login screen contains fields for entering username and password.
- Verify that the username field is visible and editable.
- Verify that the password field is visible and editable.
- Verify that the password field hides the entered characters.
- Verify that the login screen contains a "Forgot Password?" link/button.
- Verify that the "Forgot Password?" link/button redirects the user to a password recovery screen.
- Verify that the login screen contains a "Create Account" link/button.
- Verify that the "Create Account" link/button redirects the user to a registration screen.
- Verify that the login button is disabled when both the username and password fields are empty.
- Verify that the login button is disabled when the username field is empty and the password field is not empty.
- Verify that the login button is disabled when the password field is empty and the username field is not empty.
- Verify that the login button is enabled when both the username and password fields are filled out.
- Verify that the login button is disabled when the username and password fields are filled out, but the username field is invalid.
- Verify that the login button is disabled when the username and password fields are filled out, but the password field is invalid.
- Verify that the login button is enabled when the username and password fields are filled out with valid credentials.
- Verify that the login button changes to a loading state when clicked.
- Verify that the login button returns to its original state after the login process is complete.
- Verify that the login process fails and displays an error message when the username does not exist in the system.
- Verify that the login process fails and displays an error message when the password is incorrect.
- Verify that the login process fails and displays an error message when both the username and password are incorrect.
- Verify that the login process is successful when the username and password are correct.
- Verify that the user is redirected to the home screen after a successful login.
- Verify that the user is not able to access the home screen without logging in first.
- Verify that the user is logged out when they click the "Logout" button.
- Verify that the user is redirected to the login screen after logging out.
- Verify that the user is able to log back in with their previous credentials after logging out.
- Verify that the user is able to copy and paste their username and password into the login fields.
- Verify that the login screen is responsive and works properly on different screen sizes.
- Verify that the login screen complies with accessibility standards and is usable by people with disabilities.
With this article at OpenGenus, you must have the complete idea of different test cases for a feature like login.
Sign up for FREE 3 months of Amazon Music. YOU MUST NOT MISS.