Monday 24 April 2017

Requirement traceability matrix, Boundary value Analysis and Equivalence partitioning

What is RTM (Requirement traceability matrix) ?

Mapping 'Client Requirements' with 'Use case', 'test scenario' and 'test case' to ensure whether all the client requirements are covered.

Types of Trace-ability Matrices :

1.Forward Traceability: Mapping of requirements to test cases.
   eg.

2.Backward Trace-ability: Mapping of test cases to requirements.
    eg.




Why RTM is important:
1.It helps to increase test coverage.
2.The trace ability matrix document is prepared to show clients that the coverage is complete. 
3.It help to find out which test cases are impacted or need to be update if any specific requirement gets changed.
eg. Suppose there is RTM 


If Suppose 'forgot password' functionality is changed,then it is easy to identify with the help of RTM that which test scenario and test cases will be impacted.


                       Test Data Techniques/methodologies

Test Data:
Boundary value Analysis and Equivalence partitioning are test data/test case methodology of black box testing.

eg. Suppose for input box,there is expected acceptable range is from 1 to 1000.


1. Equivalence Partition:
It focus on finding error in center of input domain.
Under this testing,we makes three sets .(three equivalence classes)

Lets take an example of any text field which accept only data between range of 1 to 1000.

1st Class:(with valid values) eg. Pick Any single value from between range range 1 to 1000.
2nd Class:(lower invalid value) eg. Pick any value below 1.
3rd Class:(Upper invalid value) eg. Pick any value above 1000.

(Lower Invalid value) < ( Valid Range : 1 ---- 1000) < (upper invalid value)

Equivalence partitioning uses fewest test cases to cover maximum requirements.


2. Boundary value analysis: 
Basic logic: There is always maximum possibility of bugs at the boundaries of input domain.So,BVA focus on boundary of input domain.

It is a next part of Equivalence partitioning for designing test cases where 
test cases are selected at the edges of the equivalence classes.


1st:: Value at exact input boundary. i.e. values 1 and 1000 in our case.
2nd:: Value just below the extreme edges of input domains i.e. values 0 and 999.
3rd:: Value just above the extreme edges of input domain i.e. values 2 and 1001.

eg.     (invalid 0 ) < ( Valid: 1---- Valid:1000) < (invalid 1001 )

If range: 1---1000
then boundary value is 1 & 1000. so '1' is min & '1000' is max.
1.)valid: min,max  eg.  '1'  & '1000'
2.)valid: min+1,max-1 eg. '2' & '999'
3.)Invalid : min-1,max+1  eg. '0'  & '1001'
   
Boundary value analysis is often called as a part of stress and negative testing.
So,we can say Boundary value analysis is best practice for software testing.


Example:
In online form of any entrance exam,there is always a some eligibility criteria for students that
'The minimum age limit is 21 years and maximum age limit is 32 years and the number of attempts is 06'.
Now the questions is how many test cases we need to test this 'Age' and 'Attempt' functionality.
you can test by any date of birth.But large no. of scenario will waste your time.Then we always look for the way by which we can test any functionality by minimum no.of test cases which cover your functionality correctly and save your time. The best practice is B.V.A. because we know there is always of chance of bugs at boundary.

As per Boundary value Analysis:
'Minimum no. of test Scenario' needed  is '6'.
Since Age limit  from 21 to 32.

Valid:
TS#01: Test Age field with  min.'21' yrs old. (i.e. Min )
TS#02: Test Age field with  max.'32' yrs old. (i.e. Max )

Valid:
TS#03: Test Age field with '22' yrs old. (i.e. Min+1 )
TS#04: Test Age field with '31' yrs old. (i.e. Max-1 )

Invalid:
TS#05: Test Age field with '20' yrs old. (i.e. Min-1 )
TS#06: Test Age field with '33' yrs old. (i.e. Max+1 )


While for testing 'Attempt' field.
Since validation limit is 6 attempts.it means as person can try upto 6 attempts.
So,there are '3' minimum no. of test cases to test 'Attempt' field.So,We will test only with these 3 TC.
So As per BVA,

Valid:
TS#01: Test Attempt field with '6' . (i.e. Max. )


Valid:
TS#02: Test Age field with '5' . (i.e. max-1 ).it means If 5 is accepted by application.it means there is high possibility of accepting 4,3,2,1,0. So,now there is no need of testing with Age values 4,3,2,1,0

Invalid:
TS#03: Test Age field with '7' . (i.e. Max+1 ).it means If 7 is not accepted by application.it means there is high possibility of accepting 4,3,2,1,0. So,now there is no need of testing with Age values 8,9,10 etc.

lets take another example of 'Age' date range for 'Date of Birth' field.
There is 'Date of Birth' field on exam form which can accept only those candidate form whose age is between of 21 years to 32 years old.
now to test this 'Date of Birth' field ,we have to identify minimum number of test cases to test its validation limit.



No comments:

Post a Comment

Manual Testing : Chapter 2

                                                    Software Testing How can be test a software? 1. Manually. 2. Automation to...