0% found this document useful (0 votes)
40 views28 pages

Introduction To White Box Testing

White box testing is a software testing technique that tests the internal logic and structure of an application by examining code execution paths, internal data structures, and code structure. It involves testing individual program units or modules and is used to validate that each unit of code is working properly. White box testing helps find errors in hidden code paths, optimize code by removing unnecessary logic, and ensure a high level of code coverage during testing.

Uploaded by

Neha Dogra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views28 pages

Introduction To White Box Testing

White box testing is a software testing technique that tests the internal logic and structure of an application by examining code execution paths, internal data structures, and code structure. It involves testing individual program units or modules and is used to validate that each unit of code is working properly. White box testing helps find errors in hidden code paths, optimize code by removing unnecessary logic, and ensure a high level of code coverage during testing.

Uploaded by

Neha Dogra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 28

Introduction to White box Testing

Static Black Box Testing

• Static testing, as the name suggests, is used to test the software without compilation.

When the test is performed to check the specifications, it is called static black box

testing.

• Usually the specification is a document that provides information of the software

functionalities. This document is created during the initial stages of the Software

Development Life Cycle (SDLC) based on the input from the customer and designer.

The tester carefully performs static black box testing and checks for bugs.

• The focus of static black box testing is to check for completeness or appropriateness 2
Dynamic Black Box Testing
• Static black box testing is carried out without the tester executing the code, whereas
dynamic black box.
• testing is carried out with data. It is termed “dynamic” since the tester is able to observe
the changes exhibited by the system.
• The test is carried out by providing pre-defined inputs and the outputs are recorded.
These outputs are compared with the correct output, and the variation that exists between
the actual output and desired output are segregated as bugs.
• These tests are carried out using test cases. The test cases have to be defined effectively in
order to find the bugs. The entire test process will depend on the test cases. A software
application undergoes a dynamic black box test. The test case defines that the application
has to produce an output D when the inputs A and B are given. If the application gives an
output C, then the application fails the test case and this is a bug.

3
Test to Pass and Test to Fail

4
Equivalence Partitioning

5
Summary

6
Testing Techniques

Testin
g

Static Dynamic

Review Static analysis


Defect-based
testing
Black-box
testing
White box
Dynamic
testing
analysis
Experience-
based testing
What is white box testing?

White Box Testing is the testing of a software


solution's internal coding and infrastructure:

•By writing a set of white-box test cases that


exercise the paths in the code.

White box testing technique is used to:

•Help identify which line of code is actually


executed and which is not, which may indicate
that there is either missing logic or a typo.
White box testing is also
known as……

• Structure-based testing technique

• Glass-box testing technique


Why is it called White box testing ?

Because here the testers require


knowledge of how the software
is implemented.
How to encounter a bug in white box testing?
It involves testing a series of predefined inputs against expected outputs , so when a
specific input does not result in the expected output, you have encountered a bug.
White box testing Vs. Black box testing

In Black box testing, we test the software


from a user’s point of view.

In White box testing, we evaluates the


code and internal structure of the program.
White box testing Vs.
Unit testing

Unit testing is a part of white box testing.


White box testing Vs. Automation testing

In Automation testing, we automate the manual testing of the system functionality.

In White box testing, we evaluates the code and internal structure of the program.
What are the advantages of white box testing?

•It reveals errors in "hidden" code.

• It helps in optimizing the code by removing the extra


lines of code, which can bring in hidden defects.

Research has shown that with all of black box testing techniques , maybe as much
as 70 percent of all of the code in the system might never have been executed
once!

Not even once!


What are the disadvantages of white box testing?

•In-depth knowledge about the programming language is necessary to perform white


box testing.

•It is not realistic to be able to test every single existing condition of the application and
some conditions will be untested.

•The tests focus on the software as it exists, and missing functionality may not be
discovered
Why to use White box testing?

It serves two purposes:

It is used to design structured test cases


Structured test cases design with the aim of increasing the test
coverage.

It is used to assess the amount of testing


Test coverage measurement performed by the structured test cases.
What are the steps to perform
white box testing?

Understand the Agree on the Create and execute Preparing the


source code Benchmarks the test cases final report
Static and Dynamic White Box Testing
• Static white box testing methodology involves testing the internal logic and structure
of the code without compiling and running the program.
• The main advantage of performing static white box testing is that bugs are found
early and those that cannot be uncovered by dynamic white box are also identified.
• To perform this type of testing, a software tester needs to have the knowledge of
software coding and the internal logic. This enables a software tester to differentiate
between the statement or the path which works from those which do not work.
• Static white box testing involves a procedure of analyzing data flow, control flow,
information flow, and also testing the intended and unintended software behaviors.
There are different aspects that are examined which include codes, branches, paths,
and internal logic.
The diagrammatic representation of static white
box testing
Formal Review
• Identify Problems
• Follow Rules
• Prepare
• Write a report
Peer Review
• Walkthroughs
• Inspections
Coding Standards and Guidelines
• Sometimes, there are also possibilities where a code may operate
correctly but may not be written to meet the specification
standards. This is similar to writing English which is
grammatically correct, but may not convey the correct meaning.
• To handle such situations, some standards are fixed based on the
have-to-follow rules of Do’s and Don’ts. Along with them, some
guidelines are also prepared. Guidelines are the best practices and
recommendations which are preferred to be followed.
• Standards are rules which must be adhered to, whereas guidelines
are instructions which enable a person to follow a set of standards.
Code Reviews Checklist
• Data Reference Errors
• Data Declaration Errors
• Computation Errors
• Comparison Errors
• Control Flows Errors
• Input/Output Errors
Dynamic White Box Testing
• Dynamic white box testing is a validation check which involves testing and running the
test cases with input values.
• The dynamic white box testing ensures that the application works according to the
specification throughout the execution. The results of the execution give proof about the
actual behavior of the code.
• A software tester collects ample information which enables the tester to analyze what the
code does, how it works, what to test, what not to test, and thus determines the approach
of the testing process.
Dynamic White Box Testing vs. Debugging
• Dynamic white box testing and debugging are two techniques which
appear similar, since they deal with the code and the bugs in software.
They do overlap when bugs are found.
• However, they are different in their goals. Dynamic white box testing
finds the bugs in the software while debugging deals with the process of
fixing the bugs that have been found during the testing phase.
• As a software tester, you are required to emphasize on the test cases that
demonstrate a bug. In white box testing, you narrow down to the
information pertaining to the number of lines of code which look
erroneous. The programmers debug the erroneous lines of code which are
reported to them. They find the reason for the cause of bug and fix it.
Unit and Integration Testing
Unit and Integration Testing

You might also like