#6 What is White Box Testing?

ux, design, webdesign
  1. It is a type of testing done by the developers where they check each and every lines of code written by them before handling over the application to the Test Engineers.
  2. It is known as White Box Testing in software engineering since the code is visible to the developers.
  3. WBT should not be done manually since it is time consuming and hideous process.
  4. Generally, it is done by writing a small set of programs known as Unit Test.
  5. Unit Test is a small program which in return tests the main program.
  6. Advantages of Unit Tests are it is time saving and can be re-used “n” number of times.
  7. Black box and White box testing are done by test engineers and Developers respectively.

Types of White Box Testing Techniques:

White Box Testing can be categorized into following parts:

  1. Path Testing
  2. Condition Testing
  3. Loop Testing

Sometimes developer also tests for Memory utilization and Response time for some particular section of code.

Path Testing:

  1. Developer checks the flow of execution of the programs with respect to code.
  2. Checks for the total number of paths.

Condition Testing:

  1. Developer checks if the statement works for both True and False conditions.

Loop Testing:

  1. Generally, developers have to use many looping statements in their program. In loop testing they check if the return program is working for complete number of specified loops or iterations.
  2. If conditions are satisfied between loops, then the program should stop execution and come out of the loop else it should execute all the loops and then come out of the program.

Memory Utilization:

  1. In this type to testing developer checks how much memory a particular section of the code utilizes during runtime.
  2. This type of testing this done to make sure the application doesn’t have any memory leakages.

Response Time:

  1. Here developer checks for the execution time of the program or functions. This is generally done with the help of some tools.

Note: Finding issues related to Memory Utilization and Response time comes under Performance Testing (non-functional Testing). When Performance Test Engineers finds this kind of issues development team will first drill down the problem by using the last two types of white box testing described above. We will have a detailed course about performance testing in the upcoming blogs.

Interview Questions related to white box testing?

  1. What is WBT?
  2. Who does WBT?
  3. When this kind of testing is done?
  4. Why WBT is required?
  5. What are the types of WBT?

If you are from testing background then there are very little chances that you will be asked how white-box testing is done by the development team. But it is always a good to have knowledge on the subject. So that’s it for this blog. If you want to know more about the difference between white box and black box testing please do check my earlier blog.

Cheers!!!

Happy Reading!!! 🙂

Leave a Comment

Your email address will not be published.