Wednesday, 16 October 2013

Test Case




                                                                                Test Case


Test Case: A Test Case is set of preconditions steps to be followed with input data and expected behaviour to validate functionality a system.

In simple words a test case is brief description of what to test and how to test.

***Note :
In Industry practically we prepare only functionality test cases.

Three types of functional test cases:

1) Positive test cases                 2) Negative test cases               3) Business validation test cases


Positive Test Case:  A Test case prepared in a positive perception to check what a system suppose to do is called positive test case.

Example:-
Tc1: Check Login with valid inputs.

Negative Test Case:  A Test case prepared to check what a system not suppose to do is called negative test case.

Example:-
Tc1: Check Login with invalid inputs.

Business Validation Test case: A test case prepared to check business conditions is called business validation test cases.

Example:-
Check fund transfer with 1000, 10000, 15000, etc is called business validation test case.

****Interview Question important****


What is a good test case?

A test case that has high probability of catching defects is called a good test case.

Test case design techniques:,Black box testing introduces the following techniques which help in preparing effective test cases to validate system functionality:

1) Equivalence class partitioning (ECP)

2) Boundary value analysis (BVA)

3) Decision table

4) State transition testing

5) Usecase testing.


Equivalence class partitioning (ECP): According to ECP at first identity all possible test cases
to validate functionality in the system. Then segregate these test cases into groups. While making
a group make sure that all test cases that belong to a group are producing the same out put
then select one test case from each group, preferably middle one for testing.





Boundary Value Analysis

It has observed that most of the times programmers are committing mistakes while specifying the boundary conditions to determine these defects BVA is helpful.


According to BVA once equivalence partitions are defined, identify the partition where there are
inputs with range. Determine outer boundary an inner boundaries for this range. For positive
negative testing consider lower boundary value minus one and upper boundary value plus one.


Decision table testing: Decision table testing is helpful to derive the test cases if functionality is
depending on multiple inputs.




As login depending on two inputs i.e., userid, password to check login we can cover a following test
cases

If functionality is depending on more number of inputs we can reduce the test cases based on
the application design


State transition testing:

*) Every software will have various possible states. The state of the application changes
from one to another based on the user actions under input supplied.

*) State transition testing is helpful to derive and prepare test cases in order to cover all possible
states of the application.

Usecase testing: Validating software to confirm whether it is develop as per the use cases or
not is called user case testing.

Requirement traceability Matrix (RTM): Mapping between test cases and requirements is
called traceability mapping.

Advantages of traceability Matrix:

*) To determine the percentage of test coverage.
*) To identify a group of test cases belongs to a requirement which helps in modify build testing
and also implementing the change request easily



No comments:

Post a Comment