Monday 15 April 2013

How to find more or good bugs


Tip 1. Review the application's requirements often. Sometimes there are no or partial test cases exist for certain requirements. You may find bugs when you test for these requirements. Be quick and you may find bugs immediately after a requirement change has been first implemented.
Tip 2. It is possible that you have created positive test cases only. If so, then create negative test cases for each requirement as well and test them.
Tip 3. Execute each test case with a variety of test data (for example by the boundary-value analysis technique or pair-wise testing technique).
Tip 4. Test the interface of your application with external systems carefully. This is where a number of bugs may exist.
Tip 5. Application settings (this is one area that may be rarely tested in fear that the application may stop working correctly or stop working altogether).
Tip 6. Repeat your tests using other supported client configurations (other CPU/RAM/operating systems/screen resolutions/browsers etc.)
Tip 7. Look at the previous bug reports against the same application or similar applications. See if you can test your application using the ideas or information contained in the previous bug reports.
Tip 8. Do not ignore the UI bugs. If they would inconvenience a user, they should be reported and fixed.
Tip 9. Create a list of items that you would like to test if you had the time. When you test your application, you may find yourself taking mental notes of things that you would like to test later.
Tip 10. In case you are working as part of a testing/ QA team, do not restrict yourself to the areas that you are supposed to test. You may find bugs in the other areas.
Tip 11. Instead of rushing through your tests at top speed, slow down . You would give yourself time to think more clearly. You would start to observe things about your application that you did not observe before.
Tip 12. Finally, take pride in the bugs reported by you. Feel free to mention an interesting bug that you found to a team member.

Saturday 13 April 2013

Cookie Testing


Major scenarios for cookies testing of a website. Multiple test cases can be generated from these scenarios by performing various combinations.
  1. Check if the application is writing cookies properly or not.
  2. Test to make sure that no personal or sensitive data is stored in the cookie. If it is there in cookies, it should be in encrypted format.
  3. If the application under test is a public website, there should not be overuse of cookies. It may result in loss of website traffic if browser is prompting for cookies more often.
  4. Close all browsers, delete all previously written cookies and disable the cookies from your browser settings. Navigate or use that part of web site which use cookies. It should display appropriate messages like "For smooth functioning of this site please enable cookies on your browser."
  5. Set browser options to prompt whenever cookie is being stored / saved in your system. Navigate or use that part of web site which use cookies. It will prompt and ask if you want to accept or reject the cookie. Application under test should display an appropriate message if you reject the cookies. Also, check that if pages are getting crashed or data is getting corrupted.
  6. Close all browsers windows and manually delete all cookies. Navigate various web pages and check and see if these web pages show unexpected behavior.
  7. Edit few cookies manually in notepad or some other editor. Make modifications like alter the cookie content, name of the cookie, change expiry date etc. Now, test the site functionality. Corrupted cookies should not allow to read the data inside it.
  8. Cookies written by one web site should not be accessible by other website.
  9. If you are testing an online shopping portal, Check if reaching to your final order summary page deletes the cookie of previous page of shopping cart properly and no invalid action or purchase got executed from same logged in user.
  10. Check if the application under test is writing the cookies properly on different browsers as intended and site works properly using these cookies. This test can be done on browsers like different versions of internet explorer, Mozilla Firefox, Netscape, Opera etc.
  11. If the application under test is using cookies to maintain the logging state for users. Check if some id is being displayed in the address bar. Now, change the id & press enter. It should display an access denied message and and you should not be able to see other user's account.

Tuesday 9 April 2013

Top 10 Negative Test Cases



1. Embedded Single Quote - Most SQL based DB’s have issues when users store information that contain a single quote (e.g. Dave's car). For each screen that accepts alphanumeric data entry, try entering text that contains one or more single quotes.

2. Required Data Entry - Functional specification should clearly indicate fields that require data entry on screens. Test each field on the screen that has been indicated as being required to ensure it asks you to enter data in the field.

3. Field Type Test - Functional specification should clearly indicate fields that require specific data entry requirements (date fields, numeric fields, phone numbers, zip codes, etc). Test each field on the screen that has been indicated as having special types to ensure it forces you to enter data in the correct format based on the field type (numeric fields should not allow alphabetic or special characters, date fields should require a valid date, etc)

4. Field Size Test - Functional specification should clearly indicate the number of characters you can enter into a field (for example, the first name must be 50 or less characters). Write test cases to ensure that you can only enter the specified number of characters. Preventing the user from entering more characters than is allowed is more elegant than giving an error message after they have already entered too many characters.

5. Numeric Bounds Test - For numeric fields, it is important to test for lower and upper bounds. For example, if you are calculating interest charged to an account, you would never have a negative interest amount applied to an account that earns interest, therefore, you should try testing it with a negative number..

6. Numeric Limits Test - Most database systems and programming languages allow numeric items to be identified as integers or long integers. Normally, an integer has a range of -32,767 to 32,767 and long integers can range from -2,147,483,648 to 2,147,483,647. For numeric data entry that do not have specified bounds limits, work with these limits to ensure that it does not get an numeric overflow error.

7. Date Bounds Test - For date fields, it is important to test for lower and upper bounds. For example, if you are checking a birth date field, it is probably a good bet that the person's birth date is no older than 150 years ago. Likewise, their birth date should not be a date in the future.

8. Date Validity - For date fields, it is important to ensure that invalid dates are not allowed (04/31/2007 is an invalid date). Your test cases should also check for leap years (every 4th and 400th year is a leap year).

9. Web Session Testing - Many web applications rely on the browser session to keep track of the person logged in, settings for the application, etc. Most screens in a web application are not designed to be launched without first logging in. Create test cases to launch web pages within the application without first logging in. The web application should ensure it has a valid logged in session before rendering pages within the application.

10. Performance Changes - As you release new versions of your product, you should have a set of performance tests that you run that identify the speed of your screens (screens that list information, screens that add/update/delete data, etc). Your test suite should include test cases that compare the prior release performance statistics to the current release. This can aid in identifying potential performance problems that will be manifested with code changes to the current release.

Testing GUI



To test any Windows based application following points are to be considered:

- It is essential to have GUI consistency within the Application.
- Should be alike in look and feel as per any other standard Window software.
- Should have standard set of keys implemented for the software.
- Should have clean and neat exit.

While testing any Windows based application the testing can be broadly categorized into following compartments. They are:
- Standardization Testing.
- GUI Testing.
- Validation Testing.
- Functionality Testing.

Standardization Testing
This compartment mainly emphasizes on the standardization part of the application. Standardization means that the application being developed should have standard look and feel like any other window application. The general guidelines are as follows:
1. The application should have first "About Application" screen displayed.
2. Most of the screens/ dialog box (as on context) should have Minimize, Restore and Close clicks.
3. Proper icon should be attributed to the application
4. All screens/ dialog box should have a proper caption as per the context used.
5. The application should be seen in the Windows Task Bar as well as status bar.

GUI Testing
This compartment mainly emphasizes on the GUI - Graphics User Interface aspect of the Application. It is not concrete that once GUI guidelines are set that can be followed blindly. GUI standards may vary from company to company and also from application to application. But still one can set general guidelines to have an overall idea on how to start GUI testing. These guidelines apply for every screen/ dialog box of the application. General guidelines are:
1. All the dialog box should have a consistent look through out the Application system. For e.g.- If the heading within a dialog box is blue then for each dialog box the heading should be of this color.
2. Every field on the screen should have an associated Label.
3. Every screen should have an equivalent OK and cancel button.
4. The color combination used should be appealing.
5. Every field in the dialog box should have a Short Cut Key support. For e.g.- User Name
6. Tab order should be normally set horizontally for the fields. In some case as per the case the Tab Order can be set vertically.
7. Mandatory fields should have * (RED ASTERIK) marked to indicate that they are mandatory fields.
8. Default key <Enter> should be set as OK for the dialog box.
9. Default key <Esc> should be set as Cancel for the dialog box.

Validation Testing
This compartment mainly emphasizes on the Validation aspect of the Application. Validation testing mainly depends on the fields set in the dialog box and the functions it has to perform. But still there are certain common rules that can be applied. General guidelines are:
1. For text box fields where value entered has to be numeric check following:
¨ It should accept numbers only and not alphabets.
¨ If field usage is such that for e.g., To accept
Total number of days
Telephone number
Zip code etc.
then it should not accept 0 and negative values.
2. For text box fields where value entered has to be alpha-numeric check following:
¨ It should accept alphabets and numbers only.
¨ If field usage is such that for e.g., accepting
First Name
Middle Name
Last Name
City
Country etc.
then field value should start with an alphabet only.
¨ Depending on the condition this fields may accept special characters like -, _, . etc.
3. If the field is a combo box then it has to be checked for following points:
¨ Check the combo box has drop down values in it, it is not empty.
¨ Drop down values should be alphabetically sorted. This might change as per requirement but as standard practices it should be alphabetically sorted. For e.g. to select data type from the list it will be as follows:
Date
Integer
String
Text, etc.
¨ Selection of any drop down value is displayed on closing and opening the same dialog box.
¨ By default some value like "Select Value" or "_______" string is displayed. This is because User comes to know that value is to be selected for this field. Avoid displaying the first default value in the list.
4. If the field is a list box then it has to be checked for following points:
¨ Check the list box has values in it, it is not empty.
¨ List box values should be alphabetically sorted and displayed. This might change as per requirement but as standard practices it should be alphabetically sorted.
¨ Selection of any list box value should put a check before the value and should display the correct value(s) selected on closing and opening of the same dialog box.
¨ If the list box supports multiple selection then check whether multiple values can be selected.
5. If the field is a list of radio button then it has to be checked for following points:
¨ Check whether as per requirements all the values are listed. For e.g. to select date format. Possible values displayed will be as follows:
mm/dd/yyyy
dd/mm/yyyy
mm/dd/yy
dd/mm/yy
yyyy/mm/dd etc.
¨ Same selected value should be displayed on closing and opening of the same dialog box.
6. Data Controls are to be tested as part of functionality testing.

Functionality Testing
This compartment mainly emphasizes on the Functionality aspect of the Application. The first step to test the Functionality aspect of the Application is to check whether all the requirements are covered in the software. The actual functionality testing totally depends from software to software. Still one can frame general guidelines. General guidelines are:
1. Check the functionality is covered as per Requirement specifications or Functional specifications developed for the software.
2. Within a dialog box identify the dependent fields. Depending on the dependency check the enabling and disabling of the fields. For e.g.: to create Contact addresses in any application. To create contact addresses user should be able to add, delete and modify the information. Contact Addresses will contain information like, First Name, Last Name, Address1, Address2, City, State, Country, Zip, Phone, etc., any other information may also be added.
This form will have the required fields and in addition to that will have Add, Delete and Update buttons. The functionality of the buttons is as follows:
¨ Initially only Add button will be enabled. Delete, Update buttons will be disabled. This is because initially there is no data available and unless one adds one cannot delete or update. In short, unless there is a single valid record available it is not possible to update or delete.
¨ Only on selecting a record from the list Delete and Update buttons are enabled and Add button is disabled. By default No records will be selected.
¨ Delete and Update should always give confirmation message before actually performing the operation.
¨ Delete operation should not show the deleted item in the list.