Wednesday, April 21, 2010

Designing test cases

Designing test cases


Designing Test Cases
Understand the Functional Specification Document (FSD): The Functional Specification is created after the Software Requirements Document. It provides more detail on selected items originally described in the Software Requirements Document. Each item in the FSD should have reference to the requirement in the RSD.
Work break down: Break the requirements into smaller requirements.
Create Test Case: For each Requirement, decide what technique you should use to derive the test cases. The below example(s) are using the Basis Path test approach and the test point test approach, to create a test case.
Using Basis Path test approach:
Use the design or code as a foundation, draw corresponding flow graph.
Determine the Cyclomatic complexity of the resultant flow graph.
Determine a basis set of linearly independent paths.
Prepare test cases that will for execution of each path in the basis set.

Using Test Point Test approach: This approach requires the creation flow graph from the FSD and then the steps as follows:
Listing down main test points: Test Points are the main functional points that define functionality. Breaking down functionality into some logical functions, which in itself serves as a separate entity, can derive test points. Each test point can then be further broken down into scenario and subsequently each scenario is broken down into test cases. In simple terms, any point in a functionality that takes a separate path to the outcome can serve as a test point. For Example: In case of Login module, the test points would be:
Correct Input
Incorrect Input
Identify Test scenarios: Test Scenario is a software-testing activity. It uses scenario tests, or simply scenarios, which are based on a hypothetical story to help a person think through a complex problem or system. They can be as simple as a diagram for a testing environment or they could be a description written in prose. For Example: In case of login module, the test scenarios would be:
Correct Input
Security
Welcome page
Incorrect Input
Error Messages
Identify the Test Cases: Prepare test cases for each scenario.
Define Test Objective for each of the Test Cases
Identify the Test data (if applicable)
Identify Platform/environment
Write Down the steps for the test cases
Identify the Expected Result
Set up the Severity/ Priority Include in traceability matrix: A method used to validate the compliance of a process or product with the requirements for that process or product.  The requirements are each listed in a row of the matrix and the columns of the matrix are used to identify how and where each requirement has been addressed.

No comments:

Post a Comment