White box testing is a test that is based on checking the details of the design, using the control structure of the procedural design program to divide the test into several test cases. At a glance, it can be concluded that white box testing is a guide to getting a 100% correct program.
Testing is done based on how a software produces output from the input. This test is carried out based on the program code.
Also called structural testing or glass box testing
Testing technique:
1. Describe the program code into the graph, namely node & edge.
If related is 1, otherwise it is zero.
In this test the results will be obtained:
* Possible source code being executed
* Time required
* Memory used
* Resources used
2. Basic path, namely measuring the complexity of program code and defining the flow to be executed.
Described the sequence, if, or while
The base path test is the white box testing technique proposed by Tom McCabe. This method allows the test case designer to derive a measure of the logical complexity of the procedural design and use this measure as a guide for defining the base set of work paths. The test cases obtained are used to work on a base set which ensures that each command is executed at least once during the test.
3. Data flow testing, to detect misuse of data in a program.
4. Cyclomatic Complexity
Cyclomatic Complexity is a measurement system that provides a quantitative measure of the logic complexity of a program. On the Path Testing basis, the results of cyclomatic complexity are used to determine the number of independent paths. Independent path is a condition in the program that connects the start node to the end node.
There are 2 equations used, namely:
V (G) = E - N + 2 or V (G) = P + 1
Information:
V (G) = cyclomatic complexity for flow graph G
E = Number of edges (arrows)
N = Number of nodes (circles)
P = Number of predicate nodes
o Advantages of White Box Testing
Logic error. Used in both 'if' and loop syntax. Where White Box Testing will detect unsuitable conditions and detect when the looping process will stop.
Assumption discrepancies. Displays assumptions that are not in accordance with reality, to be analyzed and corrected.
Typo. Detect case sensitive programming languages.
o Weaknesses of White Box Testing
- For software that is classified as large, White Box Testing is considered a wasteful strategy, because it involves large resources to do it
