Thursday, May 27, 2010

Black box testing design techniques

Black box testing is testing based upon requirement.In this we don't consider the internal logic structure.
For example, here in black box testing, if any input is passed into the system and if the result is what was expected, then the test is passed.

Following are the design techniques for black box tests:
1- Equivalence class partitioning
2- Boundary value analysis
3- decision tables
4- Orthogonal arrays.

Now we will cover one by one in detail.

1- Equivalence class partitioning:
This technique is based on mathematical set theory. When your input domain is too large
then you break down this domain into finite number of sub domains (or sets). Now when you test you software, every value in
these set will be treated as same value. So you can pick one value from each set and test you software. This way you are
able to test the large set of data with few number of test only.

So the motive behind using the techniques is clear and that is to reduce the number of test cases to save time and cost.

Example:
Suppose in a software there is a field which except numbers from 1-100. now the range 1-100 is called as partition which is
a valid partition. Other than this there are two more invalid partition and they are: <=0 and >=101 . Now we can choose one
value from each of these partitions.

Valid partition is (1,2,3...............98,99,100)
Invalid partition 1 is (0,-1,-2,-3......... so on)
Invalid partition2 is (101,102,103,......so on)

Further Equivalence partitioning is no stand alone method to determine test cases. It has to be supplemented by boundary
value analysis.


2- Boundary value analysis:
In this case, we use the term boundary conditions to identify the set of allowable or inputs,
for a particular function. Testing boundary conditions includes testing inputs that fall outside the boundaries.
The boundaries are the values on around of the beginning and end of the partitions.
Here in a valid partition the beginning value is 1 and end value is 100. so the testable values will be like 0,1,2 and 99,100,101.

so this is something the boundary values for X will be X-1, X and X+1.


3- decision tables:

This technique of decision tables can be used as a method to identify all possible inputs or combination of inputs
for a test case.
A decision table is typically divided into four quadrants, as shown below

----------------------------
=
Condition = Input values
=
----------------------------
=
Action = Output values
=
----------------------------

4- Orthogonal arrays:
This is also known as taguchi method.

Let me explain why this comes into picture. The equivalence class portioning and boundary value analysis allow u test only
single value at a time and after that decision table start to look at combination of variables. But here the combination
can becomes very large very quickly. Thus the question becomes: how do you limit the combination without compromising
the quality.
Now the orthogonal arrays technique addresses this problem. The use of this is to determine the number of experiments require
to find best solution to given design problem by testing many variables at once.

An orthogonal array is a subset of combination of values for variables such that for every pair of variables,
every pair of values occurs an equal number of times.As an example, consider a module of code that has
three decision statements where variables A, B, and C can be true (T) or false (F)
All possible combination of the three variables A, B, and C with two possible values, true and false,
can give you eight test variations.(The number of combination is the number of values raised to
the number of possible variables, or 23 = 8.)

TTT
TTF
TFT
TFF
FTT
FTF
FFT
FFF

The orthogonal array for this example offer you only following four cases.
TTF
TFT
FTT
FFF


for the rule applied here and detail pls visit
http://www2.research.att.com/~njas/oadir/oa.4.3.2.2.txt

2 comments :

  1. A very informative & enriching post. It definitely add to my knowledge about software testing services.

    ReplyDelete