Black box and white box testing
BLACK-BOX Testing
Black box testing relies on the specification of the system or modules which is being tested to derive test cases .The system is black-box whose behavior can only be determined by studying its input and the related outputs.
Another name for this is Functional testing because mathematical functions can be specified using only their input and outputs.
Black Box Testing Approach |
Problems with black box testing
The key problem for defect tester is to select input that have a high probability of being member of the set. In many cases,the selection of these test cases based on the previous experince of test engineers.They use domain knowledge to identify test cases which are likely to reveal defects.
Black-Box Testing techniques
There are various Black-Box Testing techniques are available:
- Equivalence parttioning techniques: This is black box testing method that decompose the input of a program into classes of data from which test cases can be derived.Test case design for equivalence partitioning is based on an evaluation of equivalence classes for an input condition.If a set of cobects can be linked by relationships that are symmetric,transitive and reflaxive, an equivqlence class is present.An eqivalence class represents a set of valid or invalid states for input conditions.
- Boundary value analysis techniqes:For reason that are not completely clear,the large nuber of errors tends to occur at the boundaries of the input domain rather than in the center.It is due to this reason that BVA(Boundary Value Analysis) has been developed as a testing techniques.BVA result in a selection of test cases that exercise bounding values.This is complements of equievalence partitioning.It focusing compleatly on input conditions.BVA derives test cases from the output domain as well.
- Comparision Testing:Comparision testing is a type of black-box testing.when multiple implementations of the same specification have been prouced,test cases designedusing other black box techniques are provided as input to each version of the software.If the output from each version is same,it is assumed that all implementations are correct.If the output is different ,each of the applications is investigated to determine if a defect in one or more versions in responsible for the differece.Comparision testing is not completely safe.
White-Box Testing
White-box testing is a test case design method that uses the control structure of the procedural design to derive test cases. It is also known as Stuctural testing.Using white box testing methods,the software engineer can derive test cases that
- Guarantee that all independent paths within a module have been exercised at least ones.
- exercise all logical decisions on their true and false sides.
- execute all loops at their boundaries and within their operational bounds and
- exercise internal data structures to ensure their validity.
Why white box testing
The advantage of structural/white-box testing is that an analysis of the code can be used to find how many test cases are needed to guarantee a given level of test coverage. A dynamic analyser can then be used to measure the extent of this coverage and help with test coverage design.
Path testing:
Path testing a white box testing strategy whose objective is to exercise every independent execution path through the component.If every indpendent path is executed then all statements in the program must have been executed once.All conditional statements are tested for both true and false cases.
The starting point for path testing is a program flow graph.A flow graph consists of nodes representing decisions and edges showing flow of control.The flow graph is constructed by replacing program control statements by equivalent diagrams.
0 comments:
Post a Comment