DEV Community

Cover image for White Box Testing
Furkan Gulsen
Furkan Gulsen

Posted on

White Box Testing

One of the software test design techniques, White Box Testing, can also be called transparent box testing. Just like its name, it is a technique in which test scenarios are designed by knowing and measuring the internal structure of the software’s code by looking through a white box. The main purpose of this method is to test the code snippets one by one and see that they can be run in a healthy way even in the smallest particle. It is tested whether the inputs determined as a result of the requirements meet the outputs in a part of the code. The functionality of the software is not tested.

It is mostly used by software developers as well as by software testers. This method is used at the unit, integration, and walk test levels. When we examine the advantages and disadvantages of the white box testing technique.

Image description

Advantages of White Box Tests

  • Since the tests are designed and made while the software is being developed, it can be intervened early.
  • The reliability of the code is high as the developers review their code snippets many times.
  • Code optimization is more.

Image description

Disadvantages of White Box Tests

  • Finding a qualified software tester who knows how to read code is difficult and costly.
  • There may be points that may be overlooked because the developer does his own testing.
  • Tests can take a long time because they are very comprehensive and detailed.

2 Different White Box Test Design Techniques

1. Command Test Design Technique

A command is a function that we want to perform directly in the code. Int y=5 is a command. Command test design, on the other hand, is achieved by going through all the commands in the software at least once and testing all of them.

2. Decision Test Design Technique

Decision scope is the decision points in our code that can generate more than one result, such as if else, while, switch. In this test design technique, the cases where the decision points are passed over each condition once are evaluated. Decision points must be passed over.

Top comments (0)