Tuesday, 24 May 2011

REUSABLE TEST CASES FOR WEB BASED APPLICATIONS

Reusable Test Cases for Web based Applications
Login Screen
The following test cases are for the Login Screen in Web Applications    
The following assumptions are made
1. There exists a Username field which is a text box 
2. There exists a Password field which is a text box
3. There exists an OK button
TF
SL No Test Case  Required Output
1 Type some characters in the username field as well as password field The characters typed in user name field should be visible in normal alphanumeric format and those in password field should be masked with *
2 Enter spaces in user name and password field and click on ‘Submit’ Appropriate error message should be displayed
3 Enter special symbols like &, $, #, @, (, ), ! in the username and password fields Appropriate error message should be displayed to the user.
4 Check for case sensitiveness of ‘User name’ and ‘Password’ ‘User name’ should be case insensitive and ‘Password’ should be case sensitive
5 Enter valid Username and valid Password. Then click on the OK button The Home page of the application should be displayed
6 Enter valid Username and invalid Password. Then click on the OK button A message "Invalid Password" should be displayed and the cursor should wait in the Password field
7 Enter valid invalid Username and valid Password. Then click on the OK button A message "Invalid Username" should be displayed and the cursor should wait in the Username field
8 Enter valid invalid Username and invalid Password. Then click on the OK button A message "Invalid Username" should be displayed and the cursor should wait in the Username field
9 Leave the Username and Password fields blank. Then click on the OK button A message "Username should not be blank" should be displayed
10 Enter valid Username and leave the Password field blank. Then click on the OK button A message "Password should not be blank" should be displayed
11 Enter valid Username and valid Password. Then click on the Cancel button The Username and Password fields should be cleared and the cursor should wait in the Username filed
Security
The following test cases can be used for the general security checking that needs to be done for Web Applications
SL No Test Case  Required Output
1 Type the URL of the Home page in the address bar of the browser and try to access the application  bypassing the Login page  The Login page of the application page should be displayed and the user should not be allowed to access the application directly
2 Login into the application by giving valid Username and Password. Then logout from the application. Then click on the Back button of the browser The Login page should be displayed and user should not be allowed to view the previous page
3 Check whether the password field is stored in encrypted format in the database The password should be stored in the database in encrypted format
Forgot Password
The following test cases can be used for the Forgot Password screen 
The following assumptions are made
Forgot password has a question field and answer field an ok button and cancel button.
SL No Test Case  Required Output
1 Verify the answer Fields The answer field should be blank.
2 Verify the question field. The question field should contain question which the user entered while registering else the question field should be blank.
If one or more question are there it should be listed in a combo box.
3 Verify the ok button The ok button should be enabled only when both the question and answer field contain some text.
4 Select one question and enter correct answer.
Click on OK button
The password should be displayed
5 Select one question and enter wrong answer.Click on OK button Message indicating that answer is wrong should be shown.
6 Click on cancel button. The Forgot password screen should be closed
Change Password
The following test cases can be used for the Change Password screen 
The following assumptions are made
Change password has three edit fields and ok and cancel button
Edit Fields are the following:
Old password
New password
Confirm new password
SL No Test Case  Required Output
1 Type in all edit fields The typed item should be in asterisk.
2 Click on OK button without entering anything in the edit fields Error message should pop up saying that all fields are blank.
3 Click on Cancel button without entering anything in the edit fields The change password screen should close.
4 Enter the old password, and enter the new password in new password field and confirm new password field. Click on ok button A message indicating that password changed should pop up.
5 Enter old password and new password. Click on ok button. An error message should pop up saying that confirm password should not be blank
6 Enter old password and confirm new password. Click on ok button. An error message should pop up saying that new password should not be blank
7 Enter new password and confirm new password. Click on ok button. An error message should pop up saying that old password should not be blank
8 Enter incorrect old password with both the other two fields having new password.Click on ok button An error message should pop up saying that old password is wrong.
9 Enter old password and new password in new password field and some other value in confirm password field.Click on ok button. An error message should pop up saying that the new password in confirm password is different.
10 Enter the old password, and enter the new password in new password field and confirm new password field. Click on Cancel button The old password should be retained.
11 Enter the old password, and enter the new password in new password field and confirm new password field. Click on Cancel button The change password screen should close.
12 Enter old password and new password. Click on Cancel button. The change password screen should close.
13 Enter old password and confirm new password.Click on Cancel button. The change password screen should close.
14 Enter new password and confirm new password . Click on Cancel button. The change password screen should close.
15 Enter incorrect old password with both the other two fields having new password. Click on Cancel button. The change password screen should close.
16 Enter old password and new password in new password field and some other thing in confirm password field. Click on Cancel button. The change password screen should close.
GUI Testing
The following test cases can be used for the GUI Testing 
SL No Test Case  Required Output
1 Check the title of the internet explorer window. The name should be meaningful and should reflect the action done in window.
2 Check the size of buttons in all windows. All the buttons should be of same size.
3 Check the size of pop up screen. All the pop up screens should be of appropriate size according to the action it is doing.
4 Check the placement of all the controls. All controls should be properly placed.
5 Check the color in all window. The color should be uniform.
6 Check the font and size of font in different pages The font and size of font should be same.
General Browser related testing
The following test cases can be used for the general Browser related testing
SL No Test Case  Required Output
1 Check by default ‘Back’ button and ‘Forward’ buttons are disabled It should be disabled
2 Login to the site and check for Back button It should be disabled
3 Login to the site and click on ‘Refresh’ button on the browser The page should get refreshed
4 Click on ‘Back’ button on the browser (other than Home Page) It should go back to the previous page
5 Click on ‘Forward’ button on the browser It should go to the next page (only for those pages for which are browsed already)
6 While doing any of the functions w.r.t application click on browser ‘Stop’ button It should stop that process
7 In the site, check if there any link appears, if there is any, right click on that link and select ‘Open in a New Window’ The corresponding link should be displayed in new window
8 In the site check if there any link appears, if there is any, right click on that link and select ‘Open Link’ The corresponding page for the link should be displayed.
9 Check for the expiration of the session. An opened session should be kept as open for pre-defined time, the session should not get expired in between some operations are being performed
10 Check the functionalities in all the browsers like different versions of IE, different versions of Netscape etc… In all the versions of the browsers the functionalities, fonts and images should be same.
11 Click on the ‘Back’ button provided in the application It should take to the previous page
Logout
The following test cases can be used for the Logout functionality
SL No Test Case  Required Output
1 Click on the link provided for logout It should take to the login screen
2 After logging out click on back button in the browser It should not go to the previous page

No comments:

Post a Comment