White box testing: Need, Skill required and Limitations

What is White Box Testing?
White box testing (WBT) is also called Structural or Glass box testing.

White box testing involves looking at the structure of the code. When you know the internal structure of a product, tests can be conducted to ensure that the internal operations performed according to the specification. And all internal components have been adequately exercised.

White Box Testing is coverage of the specification in the code.

Code coverage:

Segment coverage:
Ensure that each code statement is executed once.

Branch Coverage or Node Testing:
Coverage of each code branch in from all possible was.

Compound Condition Coverage:
For multiple conditions test each condition with multiple paths and combination of the different path to reach that condition.

Basis Path Testing:
Each independent path in the code is taken for testing.

Data Flow Testing (DFT):
In this approach you track the specific variables through each possible calculation, thus defining the set of intermediate paths through the code.DFT tends to reflect dependencies but it is mainly through sequences of data manipulation. In short, each data variable is tracked and its use is verified.
This approach tends to uncover bugs like variables used but not initialize, or declared but not used, and so on.

Path Testing:
Path testing is where all possible paths through the code are defined and covered. It’s a time-consuming task.

Loop Testing:
These strategies relate to testing single loops, concatenated loops, and nested loops. Independent and dependent code loops and values are tested by this approach.

Why we do White Box Testing?
To ensure:

  • That all independent paths within a module have been exercised at least once.
  • All logical decisions verified on their true and false values.
  • All loops executed at their boundaries and within their operational bounds internal data structures validity.

The need of White Box Testing?
To discover the following types of bugs:

  • Logical error tend to creep into our work when we design and implement functions, conditions or controls that are out of the program
  • The design errors due to difference between logical flow of the program and the actual implementation
  • Typographical errors and syntax checking

Skills Required:
We need to write test cases that ensure the complete coverage of the program logic.
For this we need to know the program well i.e. We should know the specification and the code to be tested. Knowledge of programming languages and logic.

Limitations of WBT:
Not possible for testing each and every path of the loops in the program. This means exhaustive testing is impossible for large systems.
This does not mean that WBT is not effective. By selecting important logical paths and data structure for testing is practically possible and effective.
Reference- http://www.softrel.org/stgb.html

Comment out your queries on white box testing below. Meantime I will cover Black box testing in detail.


#1 Nikhil

At what depth should we know programming languages? Is WBT done by dev’s?

#2 shweta

automation tools used for white box testing?????

#3 Selvi

some of the tools available in white box testing???

#4 Vijay

@ Nikhil- If you have basic idea of programming language then also you can do WBT. Just you need to learn on the fly each time on your project and need to get clear idea of the application working flow.
It would be simple for you if you use any source code analysis tool if you have basic knowledge of the language in which your application is written.
Source code understanding is most important for every white box test case as you modify the code to execute the test cases.
White box testing can also be efficient just by seeing the source code of the application. When you know some weak points where you can think this code can break simply apply those cases manually as black box testing. This concept is referred as gray box testing.

@ Shweta and Selvi: You can see a comprehensive list of testing tools listed on this page:

#5 vikas

The source code generally written by developers,but if a tester performs this WBT then :
(i)How much in depth knowledge a tester should have abt a progg languge?
(ii)If a another developer perform WBT for that module,will that be a better option?

What should be done exactly??

#6 Jitu

Hi friends,
There are tools like nUnit,JUnit for white box testing.

White box testing is done mainly by Developers , But If tester haves the required programing language knowledge then he can also perform white box testing.Tester should know the basics, like how to call function, pass parameters to function , store the values in database or text files… etc..

#7 jenny

As a manual tester in a product based company is it necessary to do white box testing??

#8 jitu

not necessary that we should have white box knowledge to work in product based company… It depends on your role and type of testing…

#9 swetha

Could u please explain how to test a smart card application manually? what are the different types of testing we should keep in mind before starting…

#10 swetha

im a fresher in testing field. nw I’m testing a smart card application. i want to know what all procedures( in WBT & BBT) I hav to do for a successful test.

#11 anil

can you tell me the types of errors

#12 swetha

How to write test cases in White Box Testing??..

#13 Gaurav

Swetha…firstly devide the testing into positive and negative testing.

Determine the unit which is to be tested, then decide the positive test case input values, which includes the border inputs as well. Then set the expected results. And finally test them against the actual results.

Same TBD with negative test cases.

#14 Kranthi

Diffrence between White-box Testing & Block-box Testing

#15 Kranthi

Iam a fresher in testing field. nw I’m testing a web based application. i want to know what all procedures( in WBT & BBT) I hav to do for a successful test.

#16 Poornima

Kindly can someone list out the tools used for White Box Testing?

#17 Poornima


Kindly can someone tell me the differences between Nunit and Junit plz?

It would be of great help as I am doing my assignments..


#18 Ashish

What are manual WBT types??? Do we have to write SQL queries for WBT???? Plz give any live case eg.


#19 Ash

Can any1 answer dis question wid reason???

Considering the following pseudo-code, calculate the MINIMUM number of test cases for statement coverage, and the MINIMUM number of test cases for decision coverage respectively.

PRINT “C must be smaller than at least one number”
PRINT “Proceed to next stage”
PRINT “B can be smaller than C”

A 3, 3.
B 2, 3.
C 2, 4.
D 3, 2.

#20 shivanand

as there are 3 read statments(Read a,Read b,Read c) so we need 3 statment coverage
consider C=3 B=2 and A=1,so if both IF condition satisfies than “PRINT “C must be smaller than at least one number” and “PRINT “B can be smaller than C”
will be executed , and next if both IF condition fails than
“PRINT “Proceed to next stage”
PRINT “B can be smaller than C”
will be executed .so we need min 2 branch coverage.

so answer is D..
let me know if m wrong….

#21 chaitanya

i think shiv you are wrong in explaining statement coverage. it means all executable codes should be executed atleast once.

#22 rajesh

please any one send material for software testing (manual)
and interview questions

#23 hi,i need notes on c programming

your notes have given me hopes in my studies.

#24 siri

I am a fresher in testing field,please any one send material for software testing (manual)
and how to prepare the interview questions

#25 Jagdish


Pls drop ur mail ID. I will send you the documents

#26 Bharath

Hi Shiv,

Following is a decision table to achieve decision coverage:

Causes Values Combinations

Effects/Results: 2 3 1 1


1. B can be smaller than C
2. Proceed to next stage
3. C must be smaller than at least one number

Now we can see that 3rd and 4th combinations are indifferent because, if the first condition fails, the result will be “B can be smaller than C” irrespective of the second condition. So we can reduce a combination and the table is as follows.

Causes Values Combinations

C>B T,F F T –
Effects/Results: 2 3 1

So, we need 3 test cases for decision coverage. Please let me know if I am wrong.

I am not sure how to write test cases for statement coverage. Should we write a test case for each line in the code? If so, what about projects where there are 10000 and more lines of code? Some one please elaborate!

#27 Srinivas.D

WBT is performed on develoer side i.e. if there is any errors during developing the code then they will conduct WBT.

Generally, WBT is done by developers. so, I think we don’t worry about WBT.
InCase If we have to do the WBT then just we have require basic knowledge on that particular domail/language.

#28 pinku

white box testing is not better in large application. i prefer black box testing better.

#29 Jitu

@pinku – Type of testing is not decided by large or small application… It is decided at the level of testing..Levels like (unit testing ,Integration Test, System test,UAT Test)…White box is used mainly in Unit testing

#30 Bhoodev

plz any one send me testing(manual) material ….and atomatiomation testing tools…

Email id-phoenix.bhoodev@gmail.com
thank’s advance

#31 pranita

for large pgm which test as considerd??????? white or black ????????? i think black ? yes

#32 Hari

Hi..Can anyone send me the manual testing material as I doing the course.


#33 hari

this is nice..understandable clear

#34 Divya

I am doing black box testing. How to correlate with white box testing as I am ineterested. Information on automation tools. Could any one send brief description on statement, branch and decision coverage.

#35 hi


#36 keerthi mai

please can any one send me manual material

#37 madu

if we start project can u tell me first process in that project. Means test plan or test cases plz give me clarity.

#38 Manikandan

First Testing Process starts with Requirement Analysis then Test Plan
Test Scenario
Test Case
Test Execution
Defect Logging
Regression Testing

#39 Geetha

Very Useful

#40 p shilpa

what is black box testing how it perform plz send me any one my mail is pshilpa235@gmail.com

#41 p shilpa

what is black box testing why it is used in testing plz any one send me my mail pshilpa235@gmail.com

#42 Neeraja

please can any one send me testing(manual) material ….and automation testing tools.

Thank You

#43 rashid

please send me testing manual and material automation testing tools and white box and black box testing how i can test so i need practical

#44 Megha

All the below questions were asked in interview,please reply back

1.When there would be need of a white box tester?

2.What all testcases can be written for “Amount” with a blank text box ,where you can enter the values

3.Place the order in descending i.e from first to be executed to the last with valid reasoning:


#45 Megha

Please reply back for the answers on mchaware@gmail.com

#46 satyanarayna

hi i am working as the manual test engineer.i write all the testcases for the web applications.i familiar with automation also.


hi, i want s/w testing material ( manual testing & automated testing) and interview questions . pl help me

#48 saurabh

i am a software developer in .NET technology from almost last 4 years, i am very much interested to go in WBT.
Can i go with this scenario, and if the please tell me to the way out, what should i need to learn or know?

Thanks in Advance:
Saurabh kr.

#49 kundan kumar

White box testing is one of the most important testing phase in software engineering field.
This test is mainly done by developer teams,it is also known as clear box testing.This testing requres full knowledge of internal structure of a programm………

#50 kashyap

can anyone tell what are the tools used for White Box Testing ?

#51 Annam

Hi, can anyone help me with testing meterials.
email id : prathima490@gmail.com

#52 Deepak

Hi, i’m working in JAVA Technology and manual testing i know to write test cases and traceability matrix but i don’t know automation tools and also White box testing & Black box testing..can any one tell me to go with Testing..

#53 Priti


Can I get some Test case samples?


#54 RK Arora

Hello Guys,
Gr8 discussion..
Can anyone send me automation and manual testing documents and interview qs on aramandeep@gmail.com.


pls send me notes for software testing i hv start working as QA so pls send me material for software testing

#56 aaishaa

why we are need to test the white box testing

#57 Afzal

I am a fresher in testing field,please any one send material for software testing (manual)
and how to prepare the interview questions

#58 Afzal

I am a fresher in testing field,please any one send material for software testing (manual)
and how to prepare the interview questions

Mail id:-naushadafzal.jmi@gmail.com

#59 @STH

1.White Box Testing This involves the Unit testing and the Integration Testing Techniques
1. Statement Coverage
2. Branch Coverage
3. Path Coverage
>Condition Coverage
>Unit Testing
>Testing for Memory Leaks
>White Box Penetration Testing
>White Box Mutation Testing

2.Black Box Testing This includes the Software Testing Techniques they are
1.BVA (Boundary Value Analysis)
2.ECP (Equivalence Class Partitioning)
3.Decision Tables
4.STF (State Transition flows)
5.Error Guessing

#60 Gayathri

I am new to testing field. Please send material for manual and automation testing for preparing for interview

#61 uddip

pls any one provide me testing material


Leave a Comment