STQA UNIT-02 Self Notes

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

SOFTWARE TESTING AND QUALITY ASSURANCE

UNIT-02: WHITE BOX TESTING:


• White box testing techniques,
• Statement coverage,
• Branch Coverage,
• Condition coverage,
• Decision/Condition coverage,
• Multiple condition coverage,
• Dataflow coverage,
• Mutation testing,
• Automated code coverage analysis.

White Box Testing is a software examining technique that involves testing the product's
underlying structure, design, and coding in order to verify input-output flow and improve
design, usability, and security. White box testing is also known as Clear box testing, Open
box testing, transparent box testing, Code-based testing, and Glass box testing since the
code is visible to the testers.

➢ Techniques for White Box Testing-

Code Coverage Analysis is a popular White box testing technique. A Test Case suite's
holes are filled through Code Coverage analysis. It identifies parts of a program that aren't
put to the test in a collection of test cases. You write test cases to check untested areas of
the code once the holes have been detected, thereby improving the quality of the software
product.
Code coverage analysis can be performed using automated technologies. A box tester can
employ the following coverage analysis techniques −
• Statement Coverage - During the software engineering testing process, this
technique mandates that every possible statement in the code be tested at least once.

• Branch Coverage - This technique examines every conceivable path of a software


application (if-else and other conditional loops).

TANISHA BANGAR 1
• Condition Coverage - In this technique, all individual conditions must be covered

• Multiple Condition Coverage In this technique, all the possible combinations


of the possible outcomes of conditions are tested at least once.

• Basis Path Testing - In this technique, control flow graphs are made from code
or flowchart and then Cyclomatic complexity is calculated which defines the
number of independent paths so that the minimal number of test cases can be
designed for each independent path.

• Decision Coverage - Decision coverage is a frequently used code testing method


which is used to validate the exposure of the limitations of various decision trees in
the program. The decision trees are typically derived from the conditional
statements, the looping statements and the Boolean expressions or values in the
program.

• Finite State Machine Coverage – FSM Coverage Finite State Machine (FSM)
coverage deserves special attention given the important role FSMs play in
describing the control functionality in many designs. It has been shown in several
technical papers and publications how developing tests to
increase FSM coverage has detected difficult-to-find bugs.

• Control flow testing: Control flow testing – It is a type of software testing that
uses program’s control flow as a model. Control flow testing is a structural testing
strategy. This testing technique comes under white box testing. For the type of
control flow testing, all the structure, design, code and implementation of the
software should be known to the testing team.

• Data flow testing: Data Flow Testing is a type of structural testing. It is a method
that is used to find the test paths of a program according to the locations of
definitions and uses of variables in the program. It has nothing to do with data
flow diagrams.

Aside from the aforementioned coverage kinds, there is a slew of others, including
Condition Coverage, Multiple Condition Coverage, Path Coverage, and Function
Coverage. Each method has its own set of advantages and aims to test (cover) all aspects
of software code. You can typically achieve 80-90 percent code coverage using Statement
and Branch coverage, which is sufficient.

TANISHA BANGAR 2
➢ Following are some of the important WhiteBox Testing Techniques −
• Statement Coverage
• Decision Coverage
• Branch Coverage
• Condition Coverage
• Multiple Condition Coverage
• Finite State Machine Coverage
• Path Coverage
• Control flow testing
• Data flow testing

➢ White Box Testing Types:

White box testing refers to a variety of testing methods that are used to assess the usability
of an application, a piece of code, or a specific software package. The following is a list −
• Unit testing − Unit testing is frequently the first type of application testing performed.
As each unit or block of code is developed, it is subjected to unit testing. The
programmer is primarily responsible for unit testing. As a software developer, you write
a few lines of code, a single function, or an object, then test it to ensure it works before
moving on to the next step. Early in the software development lifecycle, unit testing
helps in the detection of the majority of issues. Bugs discovered at this stage are less
expensive and easier to fix.

• Testing for Memory Leaks − Memory leaks are one of the most common reasons for
slow-running apps. When you have a slow-running software application, you need a
QA professional who is skilled in detecting memory leaks. Apart from the
aforementioned, both black box and white box testing include a few forms of testing.
Below is a list of them.

• White Box Penetration Testing − In this type of testing, the tester/developer has
access to the entire source code of the program, as well as extensive network
information, IP addresses involved, and all server information. The goal is to attack the
code from several aspects in order to expose security flaws.

• White Box Mutation Testing − White box mutation testing is frequently used to
determine the optimum coding strategies for growing a software solution.

TANISHA BANGAR 3
➢ The Benefits of White Box Testing-

• Code optimization through the detection of hidden defects.


• Cases for white-box tests are simple to automate.
• Because all code paths are usually covered, testing is more thorough.
• Even if a GUI is not accessible, testing can begin early in the SDLC.

➢ WhiteBox Testing's Disadvantages-

• White box testing can be time-consuming and costly.


• It irritates developers who are used to running white box test scenarios. Developers'
lack of detail in white box testing can lead to production problems.
• Professional resources with a thorough understanding of programming and
implementation are required for white box testing.
• White-box testing takes time, and larger programming applications require more time
to thoroughly test.

TANISHA BANGAR 4

You might also like