Saturday 5 October 2013

Black box testing or specification based techninque


As we first understand that we cannot see anything in blackbox. As a same way  we are not know what process happening inside the software.we just verified the output is correct as per the input.

In black box testing we can do the functional testing. we use this concept in Boundary value Analysis technique. you no need to know how the code works. you just need to know how we can give the input and verify the results.

Its applicable for Accepatance testing and System testing.

Example :

Calculator - you enter the some number and check the program gives the correct result. we no need to know about the how the process inside

How to test the black box testing

Black box testing attempts to find errors in the following categories:

Incorrect or missing functions
Interface errors
External database errors
Performance errors
Initialization and termination errors

We used specification based or black box testing for below technique

1) equivalence partitioning;
2) boundary value analysis;
3) decision tables;
4) state transition testing.

 

1) Equalence Partitioning


The idea behind that technique is we can divide the set of test conditions into groups or sets that can be considered as same.

The equalence partitioning technique we need to test only one condition from each partition. This is because all the test condition under the group treat as a same

If one test conditions in a partition works, we can assume all the test condition in the partitions or group will work. Conversely if one of the test conditions in the partitions doesnot work, we can assume that non of the test conditions under group wont work.


Invalid Partition : We can say that set of group or partition as 'INVALID'. Its used for perform the invalid testcases.

Example :

If you are testing for an input box accepting numbers from 1 to 1000 then there is no use in writing thousand test cases for all 1000 valid input numbers plus other test cases for invalid data.

here we need to think 3 views:

Test cases for input box accepting numbers between 1 and 1000 using Equivalence Partitioning:


1) Group or partition the set of testcases for value from 1 to 1000 for all valid inputs. Pick a single value from range 1 to 1000 as a valid test case. If you select other values between 1 and 1000 then result is going to be same. So one test case for valid input data should be sufficient.

2) Group or partition the set of testcases for below 1. I.e. any value below 1, as a invalid input data test case.

3) Group or partition the set of testcases for above 1000. I.e. any value above 1000, as a invalid input data test case.

So using equivalence partitioning you have categorized all possible test cases into three group or partition. Test cases with other values from any class should give you the same result.



2) Boundary Value Analysis (BVA)


For Boundary value Analysis, we can take the minimum and maximum values from the valid partition.


Example :

If you are testing for an input box accepting numbers from 1 to 1000 then there is no use in writing thousand test cases for all 1000 valid input numbers plus other test cases for invalid data.


Test cases for input box accepting numbers between 1 and 1000 using Boundary value analysis:

1) Open Boundary Value = Test cases with test data exactly as the input boundaries of input domain i.e. values 1 and 1000 in our case.

2) Lower open boundary value = Test data with values just below the extreme edges of input domains i.e. values 0 and 999.

3) Higher open boundary value = Test data with values just above the extreme edges of input domain i.e. values 2 and 1001.

Boundary value analysis is often called as a part of stress and negative testing.






No comments:

Post a Comment