What is White Box Testing,it’s Techniques,Advantages and Disadvantages?

White Box Testing

White Box Testing is a software testing method in which it tests the internal structures or workings of an application/System.It is also called as glass, structural, open box or clear box ,transparent box,code based testing.

It is one of the best method to find out the errors in the software application in the early stage of software development life cycle. In this process, deriving the test cases is most important.The test case design strategy includes all the lines of the source code which will be executed at least once or all available functions are executed to complete 100% code coverage of testing.

What do you verify in White Box Testing ?

Verifies the broken or incomplete paths in the code.
Verifies the flow of structure mentioned in the specification document
Verifies the Expected outputs
Verifies all conditional loops in the code to check the complete functionality of the application.
Verifies line by line or Section by Section in the code & cover the 100% code testing.

White Box Testing Techniques

White-box test design technique is a Procedure to derive and/or select test cases based on an analysis of the internal structure of a application.
The three main White box testing Techniques are:

1)Statement Coverage
2)Branch Coverage
3)Path Coverage

1)Statement Coverage

This technique tries to cover 100% programming statement coverage of the code, it means while testing the every possible programming statement in the code is executed at least once.It helps in assuring that all the statements execute without any side effect.

2)Branch Coverage

This technique is running a series of tests to ensure that the every possible decision conditions like if-else, for loop and other conditional loops in the code is executed at least once.It makes sure that no branching leads to abnormal behavior of the application.

3)Path Coverage

This technique corresponds to testing all possible paths which means that each statement and branch is 100% covered.It ensures that all the paths of the program are traversed at least once.This technique is useful for testing the complex programs.

Advantages and Disadvantages of White box Testing

White-box test design technique is a Procedure to derive and/or select test cases based on an analysis of the internal structure of an application.

Advantages of White box testing
  • In white box testing we can start the testing of the software, no need to wait for the GUI
  • It helps in removing the extra lines of code, which can bring in hidden defects
  • Spots the Dead/Useless Code or other issues with respect to best programming practices
  • It helps in the code optimization
  • White box tests are easy to automate
Disadvantages of White Box Testing
  • High level Knowledge about the programming language is necessary to perform white box testing.
  • On some occasions, it is not realistic to be able to test every single existing condition of the application and some conditions will be untested
  • The tests focus mainly on the software as it exists and missing functionality may not be discovered
  • To test each paths or conditions may require different input conditions, so to test full application tester need to create fill range of inputs which may be a time consuming
  • White box testing is very expensive

You may also like...

Share via
Copy link