×

Search anything:

30 test cases for a login screen

Internship at OpenGenus

Get this book -> Problems on Array: For Interviews and Competitive Programming

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:

  1. Login screen
  2. 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:

  1. Verify that the login screen is displayed when the application is launched.
  2. Verify that the login screen contains fields for entering username and password.
  3. Verify that the username field is visible and editable.
  4. Verify that the password field is visible and editable.
  5. Verify that the password field hides the entered characters.
  6. Verify that the login screen contains a "Forgot Password?" link/button.
  7. Verify that the "Forgot Password?" link/button redirects the user to a password recovery screen.
  8. Verify that the login screen contains a "Create Account" link/button.
  9. Verify that the "Create Account" link/button redirects the user to a registration screen.
  10. Verify that the login button is disabled when both the username and password fields are empty.
  11. Verify that the login button is disabled when the username field is empty and the password field is not empty.
  12. Verify that the login button is disabled when the password field is empty and the username field is not empty.
  13. Verify that the login button is enabled when both the username and password fields are filled out.
  14. Verify that the login button is disabled when the username and password fields are filled out, but the username field is invalid.
  15. Verify that the login button is disabled when the username and password fields are filled out, but the password field is invalid.
  16. Verify that the login button is enabled when the username and password fields are filled out with valid credentials.
  17. Verify that the login button changes to a loading state when clicked.
  18. Verify that the login button returns to its original state after the login process is complete.
  19. Verify that the login process fails and displays an error message when the username does not exist in the system.
  20. Verify that the login process fails and displays an error message when the password is incorrect.
  21. Verify that the login process fails and displays an error message when both the username and password are incorrect.
  22. Verify that the login process is successful when the username and password are correct.
  23. Verify that the user is redirected to the home screen after a successful login.
  24. Verify that the user is not able to access the home screen without logging in first.
  25. Verify that the user is logged out when they click the "Logout" button.
  26. Verify that the user is redirected to the login screen after logging out.
  27. Verify that the user is able to log back in with their previous credentials after logging out.
  28. Verify that the user is able to copy and paste their username and password into the login fields.
  29. Verify that the login screen is responsive and works properly on different screen sizes.
  30. 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.

30 test cases for a login screen
Share this