Classic Movies and Books

Learn Software Development

All about the processes involved in software development

Search this site
Google
 

White Box Testing Techniques

Filed Under Terms, Techniques, Testing, Process, Development, Software | Posted on August 28, 2007




There are essentially six types of White Box testing techniques:

1. Unit testing: Testing of individual hardware or software units or groups of
related units where a unit is a software component that cannot be subdivided into other components. Unit testing is important for ensuring the code is solid before it is integrated with other code. Once the code is integrated into the code base, the cause of an observed failure is more difficult to find. Unit Testing comes at the very basic level as it is carried out as and when the unit of the code is developed or a particular functionality is built.

2. Static and dynamic Analysis:
Static analysis involves going through the code in order to find out any possible defect in the code. The only generally acknowledged and therefore most important characteristic of static analysis techniques is that the testing as such does not necessitate the execution of the program. Static analysis covers the lexical analysis of the program syntax and investigates and checks the structure and usage of the individual statements.
Dynamic analysis involves executing the code and analyzing the output. While static analysis techniques do not necessitate the execution of the software, dynamic analysis is what is generally considered as `testing`, i.e. it involves running the system. The analysis of the behaviour of a software system before, during and after its execution in an artificial or real applicational environment characterises dynamic analysis. Dynamic analysis techniques involve the running of the program formally under controlled circumstances and with specific results expected. It shows whether a system is correct in the system states under examination or not.

3. Statement Coverage: In this type of testing the code is executed in such a manner that every statement of the application is executed at least once. It helps in assuring that all the statements execute without any side effect.

4. Branch Coverage: No software application can be written in a continuous mode of coding, at some point we need to branch out the code in order to perform a particular functionality. Branch coverage testing helps in validating of all the branches in the code and making sure that no branching leads to abnormal behavior of the application. Branch testing requires that tests be constructed in a way that every branch in a program is traversed at least once. Problems when running the branches lead to the probability of later program defects.

5. Security Testing: Security Testing is carried out in order to find out how well the system can protect itself from unauthorized access, hacking – cracking, any code damage etc. which deals with the code of application. This type of testing needs sophisticated testing techniques. For security testing, the thinking needs to be different.
Look at the structure of your code and think about every
possible way a user might break it. You need to be smart enough to think of your particular code and how people might outsmart it (accidentally or intentionally). Augment your test cases to handle these cases. Some suggestions follow:
• Look at every input into the code you are testing. Do you handle each input if
it is incorrect, the wrong font, or too large (or too small)?
• Look at code from a security point of view. Can a user overflow a buffer,
causing a security problem?
• Look at every calculation. Could it possible create an overflow? Have you
protected from possible division by zero?

6. Mutation Testing: A kind of testing in which, the application is tested for the code that was modified after fixing a particular bug/defect. It also helps in finding out which code and which strategy of coding can help in developing the functionality effectively.


Leave a Reply