Wednesday, July 15, 2009

Welcome to AHRT Quality Practices

This blog is aimed to capture the quality practices and standards in AHRT through involvement of the team members. This will help team members to learn the quality practices and standards and comply to the same.All team members can comment on the quality practices blogged and suggest alternatives. This will be a platform for a open discussion on the quality standards we follow in AHRT. I believe this will enable us to follow better standards resulting in better quality product.My Best Wishes to my Team.

Wednesday, July 8, 2009

How to write an Effective Test case


How to write an Effective Test case
Motive
To improve & maintain, a standard test case in the quality assurance department.
What is a Test case?
  • A test case is a document which has the components that describe the inputs, action or event and an expected response from the application, to determine whether the features of the application are working correctly.
  • Test case is a set of conditions which helps the Quality Assurance Engineer to determine whether the application is working correctly or not.
  • Test case document is worked out before the test execution.
Why does an organization need test case to test an application?
  • To validate the testing coverage of the application.
  • To validate the application status.
  • Test case plays a key role to derive the Testing Metrics.
  • Test case is used as a testing asset.
Levels of Test Case
Basic Test case
In this level QA engineer will write the test case from the available SRS (System Requirement Specification) document, Field validation document, Prototype & from the Knowledge transfer.
Functional Test Case / Practical Test Case
In this level the test case is based on the actual function & the system flow.
Test Procedure
Test procedure is a group of test cases; it will contain maximum 10 test cases.
Template for Test Case Document
Cover Page
Interfacing Files and Database
Fields for effective Test Case
1. Test Pre Requisites
  • Pre – Requisites is a common field for the set of test cases or test scenario. It contains a set of conditions to be performed by a QA engineer before executing the test cases.
  • If the Pre – Requisites are changed frequently with in a set of Test cases, the QA engineer will add an Assumption column in the Test Case Template
2. Test case ID
  • Unique identification code for the test case.
  • Test case ID should be Unique.
  • Test Case ID should contain Product Name & Module Name.
Here is an example of how a test case id should be given.
     For e.g.: HRDPower_Login_001

Test Case IDTest case DescriptionSteps to execute the test caseTest DataExpected ResultActual ResultPass/FailRemarks
1. Host the product in the Test server
2. Open a browser
3. Enter the URL http://localhost/hrdpower
HRDPower_Login_001
The following example shows how a test case id should not be given.
    For e.g.: Login_001

Test Case IDTest case DescriptionSteps to execute the test caseTest DataExpected ResultActual ResultPass/FailRemarks
1. Host the product in the Test server
2. Open a browser
3. Enter the URL http://testserver/hrdpower
Login_001
3. Test case description
  • This contains the conditions to be executed.
  • The object to be tested.
  • It describes the functionality which is to be tested.
Here is an example of how a test case description should be.
    • Good Example
      • To verify ‘the Continue button functionality which appears after the add cart functionality in sign up form’.
Test Case IDTest case DescriptionSteps to execute the test caseTest DataExpected ResultActual ResultPass/Fail
Remarks
1. Host the product in the Test server
2. Open a browser
3. Enter the URL http://smrassessments.com
AP_SignUp_004To verify the Continue button functionality which appears after the add cart functionality in the sign up forms
The following example shows how a test case id should not be.
    • Bad Example
      • Verify ‘Continue’
Test Case IDTest case DescriptionSteps to execute the test caseTest DataExpected ResultActual ResultPass/FailRemarks
1. Host the product in the Test server
2. Open a browser
3. Enter the URL http://localhost/hrdpower
AP_SignUp_004Verify ‘Continue’
4. Test Data
  • Avoid junk data for testing the application.
  • Provide all possible combinations of data.
5. Steps to Execute the Test case
  • It describes how to execute the test case.
  • It should contain all the details like how to reach the exact function with the steps.
Here is the good example for how the ‘Steps to execute the testcase’ should be.
    • Click the sign up link in the SMR Assessments login form.
    • Select the check box to select the Assessment type.
    • Click the Add cart button.
    • Click the Continue button to confirm the Assessment type.
Test Case IDTest case DescriptionSteps to execute the test caseTest DataExpected ResultActual ResultPass/FailRemarks
1. Host the product in the Test server
2. Open a browser
3. Enter the URL http://smrassessments.com
AP_SignUp_004To verify the Continue button functionality which appears after the add cart functionality in the sign up form1. Click the Signup link in the SMR Assessments login form.
2. Select the check box to select the Assessment type.
3. Click the ADD Chart button.
4. Click the Continue button to confirm the Assessment type.
This is a bad example which shows how the ‘Steps to execute the test case’ should not be.
    • Click continue button
Test Case IDTest case DescriptionSteps to execute the test caseTest DataExpected ResultActual ResultPass/FailRemarks
1. Host the product in the Test server
2. Open a browser
3. Enter the URL http://smrassessments.com
AP_SignUp_004To verify the Continue button functionality which appears after the add cart functionality in the sign up form.Click Continue button
6. Expected Result
  • It describes what the End user expects from the particular field.
Good Example
    • System should redirect to the company information form.
    • System should show the Assessment Type & Price label.
    • Create Account should be highlighted at the top of the form.
    • System should show the cancel button at the end of the form.
    • All the fields should be in Editable form.
    • Administrator Name, Email ID & Company Name fields should be mandatory.
    • Secure, Spam & Conduct details should be placed in the Left Panel.
Test Case IDTest case DescriptionSteps to execute the test caseTest DataExpected ResultActual ResultPass/FailRemarks
1. Host the product in the Test server
2. Open a browser
3. Enter the URL http://smrassessments.com
AP_SignUp_004To verify the Continue button functionality which appears after the add cart functionality in the sign up form.1. Click the Signup link in the SMR Assessments login form.
2.Select the check box to select the Assessment type.
3. Click the ADD Chart button.
4. Click the Continue button to confirm the Assessment type
1. System should redirect to the company information form.
2. System should show the Assessment Type & Price label.
3. Create Account should be highlighted at the top of the form.
4. System should show the cancel button at the end of the form.
5.All the fields should be in Editable form.
6.Administrator Name, Email ID & Company Name fields should be mandatory.
7.Secure, Spam & Conduct details should be placed in the Left Panel
Bad Example
    • System should redirect to the Appropriate
Test Case IDTest case DescriptionSteps to execute the test caseTest DataExpected ResultActual ResultPass/FailRemarks
1. Host the product in the Test server
2. Open a browser
3. Enter the URL http://smrassessments.com
AP_SignUp_004To verify the Continue button functionality which appears after the add cart functionality in the sign up form.1. Click the Signup link in the SMR Assessments login form
2.Select the check box to select the Assessment type
3. Click the ADD Chart button.
4. Click the Continue button to confirm the Assessment type
System should show the appropriate form
7. Actual Result
  • The QA Engineer fills this field after the execution.
  • In other words actual result is the output of the Test case execution.
8. Pass/Fail
  • If Expected Result = Actual Result then the result is Pass
  • If Expected Result Actual Result then the result is Fail
9. Comments
  • The QA Engineer will enter the comments like why the test case has been failed or some notes about the scenario.
  • The QA Engineer can add the screen shots of the test case output.
Terms of words
  • Use ‘To verify’ as the first word in the Test case description instead of ‘To Check’ or some other words.
  • Use ‘Select & Enter’ instead of using the situation to identify what is being tested.
  • Test case should be simple and understandable.
  • Make the Test fields in points rather than writing an essay.
Types of Test cases
  • Functional Test case
    • In others words it is called as a Positive Test case.
    • These test cases are used to do the system flow testing.
Good Example
Test Case IDTest case DescriptionSteps to execute the test case Test DataExpected ResultActual ResultPass/FailRemarks
1. Host the product in the Test server
2. Open a browser
3. Enter the URL http://smrassessments.com
AP_SignUp_004To verify the Continue button functionality which appears after the add cart functionality in the sign up form.1. Click the Signup link in the SMR Assessments login form
2.Select the check box to select the Assessment type
3. Click the ADD Chart button.
4. Click the Continue button to confirm the Assessment type
1. System should redirect to the company information form.
2. System should show the Assessment Type & Price label
3. Create Account should be highlighted at the top of the form
4. System should show the cancel button at the end of the form
5.All the fields should be in Editable form
6.Administrator Name, Email ID & Company Name fields should be mandatory
7.Secure, Spam & Conduct details should be placed in the Left Panel
Bad Example
Test Case IDTest case DescriptionSteps to execute the test caseTest DataExpected ResultActual ResultPass/FailRemarks
1. Host the product in the Test server
2. Open a browser
3. Enter the URL http://smrassessments.com
SignUp_004Verify ‘Continue’Click Continue buttonSystem should show the appropriate form
  • Negative Test case
    • Used to find the validation errors in the application.
    • The QA Engineer will give the negative combinations & the incomplete data as input to the application.
Good Example
Test Case IDTest case DescriptionSteps to execute the test caseTest DataExpected ResultActual ResultPass/FailRemarks
1. Host the product in the Test server
2. Open a browser
3. Enter the URL http://smrassessments.com
AP_SignUp_004To verify the Email ID field validation in the Company information form in the sign up link1. Click the Signup link in the SMR Assessments Login form
2. Click the checkbox to select the Assessment Type
3. Click the Buy button
4. Enter the data in the appropriate fields
5. Enter the Invalid Email Id
6. Click the Save button
bala@yahoo.com1. System should not accept the Invalid Mail ID2. System should show the proper warning message
Bad Example
Test Case IDTest case DescriptionSteps to execute the test caseTest DataExpected ResultActual ResultPass/FailRemarks
1. Host the product in the Test server
2. Open a browser
3. Enter the URL http://smrassessments.com
AP_SignUp_004To verify the Email ID field validation in the company information form in the sign up link1. Click the Signup link
2.Check with the Checkbox for the price
3. Click Buy.
4. Place the Cursor
5. Enter the Char, Special Chars for the correct syntax
bala@yahoo.com1. The cursor should be placed in the text box
2. The text box should accept the Char & Special Char
3. Email Id syntax should be checked correctly
4.Otherwise system throws the validation message
  • Boundary value analysis
    • Set the boundary for the field & write the Test case for those boundaries
    • There are three types of Boundaries
      1. On the Boundary
      2. Up the boundary
      3. Below the boundary
Test Case IDTest case DescriptionSteps to execute the test caseTest DataExpected ResultActual ResultPass/FailRemarks
1. Host the product in the Test Server.
2. Open a browser.
3. Enter the URL http://testserver/hrdpower
4. Set the minimum boundary of Hours per week as 40 in Admin module
HRD_Position_001To verify the Hours per week field validation in the ‘On the boundary’ analysis.1. Login as HR/ HR Manager
2. Click the master menu
3. Click the Position analytical
4. Click the New button
5. Enter the relevant data in all the fields
6. Enter the ‘On the boundary value’ in the Hours per week field
40System should accept the value in the Hours per week field
HRD_Position_002To verify the Hours per week field validation in the ‘Up the boundary’ analysis.1. Login as HR/ HR Manager
2. Click the master menu
3. Click the position analytical
4. Click the new button
5. Enter the relevant data in all the fields
6. Enter the ‘Up the boundary value’ in the Hours per week field
41System should accept the value in the Hours per week field
HRD_Position_003To Verify the Hours per week field validation in the ‘Below the boundary’ analysis1. Login as HR/ HR Manager
2. Click the master menu
3. Click the Position analytical
4. Click the New button
5. Enter the relevant data in all the fields
6. Enter the ‘Below the boundary’ value in the Hours per week field
39System should not accept the value in the Hours per week field
Sample Test Case