test cases for a login page code example

Example: test cases for login page

how to write test cases for a Login page

UI Test Scenarios for Login Page
*Verify that all the labels and controls including text-boxes, buttons, and links are present on the Login page.
*Verify that the font type and size of the labels and the text written on the different elements should be clearly visible.
*Verify that the size, color, and UI of the different elements are as per the specifications. 

Functional Test Scenarios for Login Page
1.Verify that as soon as the login page opens, by default the cursor should remain on the username textbox.
2Verify that the user is able to navigate or access the different controls by pressing the ‘Tab’ key on the keyboard.
3.Verify that the password is in masked form when entered.
4.Verify that reset button functionality on the login page. Clicking on it should clear the textbox’s content.
5.Verify if there is a checkbox with the label “remember password” on the login page.
6.Verify that closing the browser should not log-out an authenticated user. Launching the application should lead the user to login state only.

Security Test Scenarios
1.Verify that there is a limit on the total number of unsuccessful login attempts. So that a user cannot use a brute-force mechanism to try all possible combinations of username-password.
2.Verify that in case of incorrect credentials, a message like “incorrect username or password” should get displayed instead of an exact message pointing to the incorrect field. This is because a message like “incorrect password” will help a hacker in knowing that the username is correct and he just needs to try a different combination on the password field only.
3.Verify the login session timeout duration. So, that once logged-in a user cannot be authenticated for a life-time.

To read complete post visit https://artoftesting.com/

Tags:

Misc Example