[Drupal Testing] What are the Test Cases to be considered while testing login page in Drupal?

| | 3 min read

Drupal sites usually have authorized as well as unauthorized users. The privilege of authorized users is that they can access certain pages of the website in addition to the pages that can be accessed by unauthorized users. A user account page/Login page is included in Drupal for those users who wish to access the website as an authenticated user. Read on to know the test cases to test the login page in Drupal.

The default Drupal Login page mainly consists of following three tabs (Check the images for reference).

  1. Create new account
  2. Login
  3. Request new password


This article will cover all possible test cases for the above three tabs.

Test Cases for Log in:

Registered users can access their privileges by entering their Username and Password in the respective fields of the login form. There will be a Captcha field to ensure security.
user

  1. Ensure that the system accepts a valid Username and password combination.
  2. Ensure that the system rejects invalid Username and password combination.
  3. Ensure that the user is not able to login on entering invalid username and correct password.
  4. Ensure that the user is not able to login on entering valid Username and invalid password.
  5. Ensure that an error message is displayed on leaving the mandatory fields empty.
    Drupal default error message for the above case is:
    Username field is required.
    Password field is required.
    Captcha field is required.
  6. Ensure that the password is case sensitive.
  7. Ensure that the inputs given in password field are automatically converted to a masked/encrypted form. Also ensure that this input entry remains to be in masked/ encrypted form when copy pasted.
  8. Ensure that the system accepts the valid Captcha.
  9. Ensure that the system rejects invalid Captcha.
  10. Ensure that the Captcha code changes as the System reloads.
  11. Ensure that the user is redirected to the corresponding page on submitting valid input data in the login fields.

Test Cases for 'Create new account:'

Creating a new account page allows users to register to a site by entering valid username and e-mail address in the respective fields.create.jpg

  1. Ensure that the system accepts the valid username and e-mail address combination.
  2. Ensure that system rejects the invalid username and e-mail address combination.
  3. Ensure that the system rejects the valid e-mail address and invalid username combination.
  4. Ensure that the system rejects the invalid e-mail address and valid username combination.
  5. Ensure that an error message is displayed on leaving the mandatory fields empty.
    The default Drupal default error message for the above case is:
    Username field is required.
    E-mail address field is required.

Test Cases for Request new password:

The Request new password form allows a user to request for a new password in case if the he forgets the password. On entering the correct username or email, a request for new password will be sent. An automatically generated link will be mailed to the user's mail id. On clicking that link,a user will be directed to his profile edit page where he can enter a new password thus access his existing account.request

  1. Ensure that the user receives new password on entering his/her username.
  2. Ensure that the user receives new password on entering his/her e-mail address.
  3. Ensure that an error message is displayed on submitting the form by leaving the fields empty.
    The Drupal default error message for the above case is:
    Username or e-mail address field is required.
  4. Ensure that an error message "Sorry, 'test' is not recognized as a user name or an e-mail address."is displayed on entering unrecognized user name or e-mail address (here 'test' is the entered data/input).


Hope this article helps. Happy Testing!