- 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.
- It is known as White Box Testing in software engineering since the code is visible to the developers.
- WBT should not be done manually since it is time consuming and hideous process.
- Generally, it is done by writing a small set of programs known as Unit Test.
- Unit Test is a small program which in return tests the main program.
- Advantages of Unit Tests are it is time saving and can be re-used “n” number of times.
- 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:
- Path Testing
- Condition Testing
- Loop Testing
Sometimes developer also tests for Memory utilization and Response time for some particular section of code.
Path Testing:
- Developer checks the flow of execution of the programs with respect to code.
- Checks for the total number of paths.
Condition Testing:
- Developer checks if the statement works for both True and False conditions.
Loop Testing:
- 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.
- 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:
- In this type to testing developer checks how much memory a particular section of the code utilizes during runtime.
- This type of testing this done to make sure the application doesn’t have any memory leakages.
Response Time:
- 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?
- What is WBT?
- Who does WBT?
- When this kind of testing is done?
- Why WBT is required?
- 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!!! 🙂