in Technology by
How many types and Techniques of White Box Testing?

1 Answer

0 votes
by

There are several types and different methods for each white box testing type.

See the below image for your reference.

<!--[if gte vml 1]> <![endif]--><!--[if !vml]-->image<!--[endif]-->

.

3 Main White Box Testing Techniques:

  1. Statement Coverage
  2. Branch Coverage
  3. Path Coverage

Note that the statement, branch or path coverage does not identify any bug or defect that needs to be fixed. It only identifies those lines of code which are either never executed or remains untouched. Based on this further testing can be focused on.

Let’s understand these techniques one by one with a simple example.

#1) Statement coverage:

In a programming language, a statement is nothing but the line of code or instruction for the computer to understand and act accordingly. A statement becomes an executable statement when it gets compiled and converted into the object code and performs the action when the program is in a running mode.

Hence “Statement Coverage”, as the name itself suggests, it is the method of validating whether each and every line of the code is executed at least once.

#2) Branch Coverage:

“Branch” in a programming language is like the “IF statements”. An IF statement has two branches: True and False.

So in Branch coverage (also called Decision coverage), we validate whether each branch is executed at least once.

In case of an “IF statement”, there will be two test conditions:

  • One to validate the true branch and,
  • Other to validate the false branch.

Hence, in theory, Branch Coverage is a testing method which is when executed ensures that each and every branch from each decision point is executed.

#3) Path Coverage

Path coverage tests all the paths of the program. This is a comprehensive technique which ensures that all the paths of the program are traversed at least once. Path Coverage is even more powerful than Branch coverage. This technique is useful for testing the complex programs.

Let’s take a simple example to understand all these white box testing techniques.

Also check => Different Types of testing

White Box Testing Example

Consider the below simple pseudocode:

<p class="MsoNormal" style="margin-bottom:.25in;line-height:normal;tab-stops

Related questions

0 votes
    How many types of White Box Testing Tools?...
asked Oct 19, 2020 in Technology by JackTerrance
0 votes
    What is the Difference Between White-Box and Black-Box Testing?...
asked Oct 19, 2020 in Technology by JackTerrance
0 votes
    Does White box testing requires detailed programming skills?...
asked Oct 19, 2020 in Technology by JackTerrance
0 votes
    What is the use of white box Testing?...
asked Oct 19, 2020 in Technology by JackTerrance
0 votes
    What is the coverage of the White Box Testing ?...
asked Oct 19, 2020 in Technology by JackTerrance
0 votes
0 votes
    Dynamic testing can be performed on the principles of white and black box testing. (1)True (2)False...
asked Jun 1, 2021 in Education by JackTerrance
0 votes
    How many types of recovery control techniques: (a) 2 (b) 3 (c) 4 (d) 5 This question was ... is from Querying database part 5 in chapter Transactions of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    How many Types Of Performance Testing?...
asked Oct 19, 2020 in Technology by JackTerrance
0 votes
    How many flips does the simplest of pancake sorting techniques require? a) 3n−3 flips b) 2n-4 flips c) 2n-3 flips d) 3n-2 flips...
asked Dec 28, 2022 in Technology by JackTerrance
0 votes
    How many techniques are available to control concurrency on B+ trees? (a) One (b) Three (c) Four ... in Index Structures in chapter Concurrency Control of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    What are the types of password cracking techniques?...
asked Feb 17, 2021 in Technology by JackTerrance
0 votes
    A box contains 5 red marbles, 8 white marbles and 4 green marbles. One marble is taken out of the box at random ... red (ii) not green Select the correct answer from above options...
asked Nov 25, 2021 in Education by JackTerrance
0 votes
    A box contains 5 red marbles, 8 white marbles and 4 green marbles. One marble is taken out of the box at random. ... (iii) not green ? Select the correct answer from above options...
asked Nov 25, 2021 in Education by JackTerrance
0 votes
    A box contains two pair of socks of two colours (black and white). I have picked out a white sock. I pick out ... I will make a pair? Select the correct answer from above options...
asked Nov 25, 2021 in Education by JackTerrance
...