[Drupal Testing] What are the Test Cases to be considered while testing login page in Drupal?
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).
- Create new account
- Login
- 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.
- Ensure that the system accepts a valid Username and password combination.
- Ensure that the system rejects invalid Username and password combination.
- Ensure that the user is not able to login on entering invalid username and correct password.
- Ensure that the user is not able to login on entering valid Username and invalid password.
- 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.
- Ensure that the password is case sensitive.
- 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.
- Ensure that the system accepts the valid Captcha.
- Ensure that the system rejects invalid Captcha.
- Ensure that the Captcha code changes as the System reloads.
- 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.
- Ensure that the system accepts the valid username and e-mail address combination.
- Ensure that system rejects the invalid username and e-mail address combination.
- Ensure that the system rejects the valid e-mail address and invalid username combination.
- Ensure that the system rejects the invalid e-mail address and valid username combination.
- 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.
- Ensure that the user receives new password on entering his/her username.
- Ensure that the user receives new password on entering his/her e-mail address.
- 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.
- 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!