To access any online service or provide online services to others. You need to log in to the system to access the dashboard/admin panel.
But what if the login process of any system is broken or any unauthorized person can bypass the login and access your system, that will impact badly to your system, or you may lose users’ credentials.
In this tutorial, we will examine how to write test cases for a login page. You may want to look at these test cases for the login page of your application under test.
As we understand that the goal here is to cover the different features to be tested instead of creating formal test cases, we will be presenting test scenarios here.
Now, let’s take a look at some sample test cases for the login page, categorized by type of testing.
Also read Why do we need to create Test Scenarios?
In this context, we are going to take reference to the itlearn360 login process.
UI Test Scenarios for Login Page
- Check that all the labels and controls, including text boxes, buttons, and links, are available on the Login page.
- Make sure that the font type and size of the labels and text written on different elements are clearly visible.
- The size, color, and UI of the different elements should be checked.
- Verify that the application’s user interface is responsive, adjusting to different screen resolutions and devices.
Functional Test Scenarios for Login Page
- The login page should open, and the cursor should remain on the username or email text box.
- Ensure that the user can navigate or access the different controls by using the tab key on the keyboard.
- The password field should be checked to see if the password is masked.
- Check if the password can be instantly copied and pasted.
- Ensure that the user can log in by entering valid credentials and clicking the ‘Login’ button.
- Confirm that the user can log in with valid credentials, and then press the enter key.
- Make sure that the user cannot log in with an invalid username and password.
- If the user leaves the password field blank, the validation message will be displayed.
- The validation message should be displayed if the user exceeds the character limit in the username field or password field.
- Check the functionality of the reset button on the login page.
- You can check if there is a button on the login page that says remember password.
- If you close the browser, make sure you don’t log out as an authentic user.
Watch How to Automate Login Webpage Using Selenium Webdriver?
Security Test Cases for Login Page
- Check whether there is a limit on the total number of unsuccessful login attempts. To prevent a user from using a brute-force mechanism, try all possible combinations of username-password.
- Check that, in the case of invalid credentials, a message like ‘invalid username or password is displayed. Instead of an exact message pointing to the incorrect field, could you provide a general message? This is because a message like “incorrect password” will help a hacker know that the username is correct.
- Check the duration of the login session timeout. Once a user is in, they can’t be verified for a lifetime.
- Make sure that when users are logged in and click the back button, they aren’t logged out.
- Check if there are any SQL Injection vulnerabilities on the login page. The application should be immune to SQL injection vulnerabilities.
- Ensure that the XSS vulnerability is not functional on the login page.
Instructor-led Training
Software Testing Online Training
- Manual Testing
- Database/SQL/Database Testing
- JIRA defect management tool
- Java Programming
- Selenium Framework
- TestNG
- Cucumber with Maven
- Basic of Jenkins
To get more details, please visit the following URL:
https://www.qaonlinetraining.com/courses/software-testing-courses/qa-online-training/
Software Testing Classroom Training
Software testing classroom training includes the following modules:
- Manual Testing
- Database/SQL/Database Testing
- JIRA defect management tool
- Java Programming
- Selenium Framework
- TestNG
- Cucumber with Maven
- Basic of Jenkins
- API Testing with SoapUI or Postman
- Performance Testing with Jmeter
To get more details, please visit the following URL:
https://www.qaonlinetraining.com/programs/master-of-software-testing-ba-istqb-training/
Note: In classroom training, Business Analyst Training is totally free. And ISTQB Certification training is totally up to you.
Conclusion
The login process is a critical part of any large application. When you start testing a login process, you should consider every possible way to test the login functionality. We hope that these test scenarios will help you to write similar test cases for different forms or similar forms.
Related links
Test cases for the Payment Gateway process