In this post, we will learn how we can write test cases for Login Page. If you read this post carefully then you will be able to write test cases for other similar forms also. This is the most common questions and mostly asked during your software testing interview. You can also read our post on how to write test cases for Bike.
UI Test Cases for Login Page
- Check that all the text boxes, buttons are present on the login page.
- Check that the font type and text is written is clearly visible.
- Verify that the UI of the application is responsive. It should automatically adjust to different screen resolutions.
- Check that the UI and size, the colour of the elements are as per the specifications.
Functional Test Cases for Login Page
- When you open the login page, the cursor should remain on the username field.
- Check that the user can move to next field by using TAB key.
- When users enters password, it should be masked.
- Check that user can copy and paste the password or not.
- Verify that the user should not be able to login through invalid password or username.
- Check that user gets an error if he/she leaves username or password field blank.
- Verify that user is able to login by using valid credentials.
- A error should be displayed if user tries to login with Invalid username and valid password.
- A error should be displayed if user tries to login with valid username and invalid password.
- Error should be displayed if user tries to login with Invalid username and invalid password.
- Verify that there should be an error displayed if user exceeds maximum limit for Login.
- Check that there is Reset button functionality is present.
- Verify that there is a checkbox named “Remember me” present on the login page.
Security Test cases
- Check that there should be a limit of unsuccessful login attempts.
- In case of invalid credentials, A error message should be displayed “Invalid credentials“. It should not display an error message like you have entered the wrong username or wrong password.
- There should be a login session timeout duration.
- When the user is logged in, it should not log out the user if the user presses the Back Button.
- Verify that the user can log in with the same credentials in different browsers.
- Check that the login page is vulnerable to SQL Injection.
These are some of the available test cases for login page which we have written. If you have any other test cases in your mind, do let us know in comments. This will help our readers to gain some extra knowledge.