0% found this document useful (0 votes)
17 views7 pages

EGV - Module3 SE 102

Uploaded by

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

EGV - Module3 SE 102

Uploaded by

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

SELF-PACED LEARNING MODULE

College

MODULE 3
Subject:

Software Engineering 2

AISAT COLLEGE – DASMARIÑAS, INC.

This material has been developed in support to the College Program implementation.
Materials included in this module are owned by the respective copyright holders. AISAT College
– Dasmariñas, the publisher and author do not represent nor claim ownership over them.
This material will be reproduced for educational purposes and can be modified for the
purpose of translation into another language provided that the source must be clearly
acknowledged. Derivatives of the work including creating an edited version, enhancement or a
supplementary work are permitted provided all original works are acknowledged and the
copyright is attributed. No work may be derived from this material for commercial purposes and
profit.
Unit White Box Testing
Module White Box Testing
SE 101 Software Engineering 2 Units: 3.0 Page |1

INFORMATION SHEET PR – 3.1.1


“White Box Testing”

White box testing — otherwise known as open box, glass box, clear box or transparent box testing — is a
technique used by developers to evaluate code and the internal structure of software. If you are in or looking to
join the software industry, it may be beneficial to understand this process to improve your skills and knowledge. In
this article, we will discuss what white box testing is, what it's used for and how to implement it, as well as
examining its techniques and advantages.

What is white box testing in software engineering?


White box testing is a software evaluating method used to examine the internal structure, design, coding and
inner-working of software. Developers use this testing method to verify the flow of inputs and outputs through the
application, improving usability and design and strengthening security. The concept is called "white box" because it
is symbolically see-through, as the code is visible to the tester during the examination. In comparison, when the
inner code isn't visible, it is called black box testing.
Using white box testing, the software is analyzed for the following:
• Internal security weaknesses
• Redundant code paths in the coding processes
• How the code handles specific inputs
• Expected output
• Whether conditional loops function correctly
• Individual testing of each function, statement and object
Testing can be done at various stages of software development, specifically at the system, integration and unit
levels. The goal is to test whether the software produces the expected results, and if it doesn't, it highlights the
problem.

How to perform white box testing


Simply put, there are two steps to white box testing:
1. Understand the source code
A tester must first know the software programming language and be familiar with secure coding practices. Security
is a primary reason to test software, so the goal is to find security concerns to prevent hacker attacks and malicious
code from being unknowingly injected into an application.
2. Test the software
Step two involves examining the software source code for correct flow and structure. One way to test the software
is by designing and writing additional code which can then appraise the source code. A tester who has a good
knowledge of code typically develops little tests for each application process. Manual testing — another testing
method — uses testing tools for the job.

White box testing techniques


There are many ways you can analyze software with white box testing. Most testers will use a process called code
coverage analysis to eliminate gaps in the testing of the code. There are a variety of techniques you can use to
accomplish this, including:
• Statement coverage: This technique ensures that each line in the code is tested at least once to find
faulty code more easily.
• Branch coverage: Using this technique, each possible path or decision point of a software application is
checked for accuracy.

SUBJECT TEACHER: APPROVED FOR


IMPLEMENTATION:
MODULE 1st – 2nd
PRELIM MR. KEEN ELIAS G. VIRTUDAZO
3 Meeting
Subject Teacher MR. WILBERT A. MAÑUSCA
School Director
Unit White Box Testing
Module White Box Testing
SE 101 Software Engineering 2 Units: 3.0 Page |2

• Condition coverage: All individual conditions are checked.


• Multiple condition coverage: All imaginable combinations of all the conceivable condition outcomes are
tested at least once.
• Basis path testing: Control graphs are created from either flowcharts or code. Cyclomatic complexity is
then calculated to define the number of independent paths so that the minimum number of test cases
can be designed for each path.
• Flow chart notation: This technique uses a directed graph made up of nodes and edges, where each node
represents a decision point or sequence of statements.
• Cyclomatic complexity: This is the measure of a software's logical and cyclomatic complexity. It is used to
define how many independent paths are present.
• Loop testing: Loops are commonly used in white box testing and are fundamental to many algorithms.
Problems are often found at the beginning or the end of a loop. Loop testing can be divided into simple
loops, nested loops and concatenated loops.
Although many of these techniques are used by testers, statement and branch coverage techniques check at least
80% to 90% of the code for errors, which is usually adequate.

Types of white box testing


A range of testing types are used to gauge the usability of an application or a specific software package:
Unit testing
This is typically performed by the programmer as the initial test completed on an application. In this method, each
block of code is tested as it is developed. The developer tests a few lines of code, a single function or an object for
correct working. Unit testing is helpful as it identifies the majority of errors early in the development cycle, making
them cheaper and easier to fix.
Quality assurance test
Memory leaks often cause a software application to run slowly. If this happens, a quality assurance test is
conducted to examine the code.
Penetration testing
This test involves attacking the code from all directions to expose security threats. The developer or tester must
know where the application runs and compile the application code, detailed network and server information and
all connected IP addresses.
Mutation testing
This test is generally used to find the best coding techniques going forward to expand the software application.

Advantages of white box testing


Depending on the software application size being evaluated, testing is often a complex job. To minimize its
complexity at each software development stage or during modification, white box testing is conducted.
The advantages of white box software testing include:
• Code optimization for finding bugs
• The entire code is tested, providing a thorough examination
• It is easily automated
• Testing can start early in the software development lifecycle, even before the graphical user interface is
available
The white box testing approach assists in producing a quality software product, providing the most unbiased
opinion regarding the code.
References:
- What Is White-Box Testing? Techniques and Examples | Indeed.com

SUBJECT TEACHER: APPROVED FOR


IMPLEMENTATION:
MODULE 1st – 2nd
PRELIM MR. KEEN ELIAS G. VIRTUDAZO
3 Meeting
Subject Teacher MR. WILBERT A. MAÑUSCA
School Director
Unit White Box Testing
Module White Box Testing
SE 101 Software Engineering 2 Units: 3.0 Page |3

SELF CHECK PR – 3.1.1


Give what is asked. True or False.
________ 1. There are 3 characteristics of a good software.
________ 2. Maintenance is when the software is moved from one place to another.
________ 3. Software Engineering is a field that doesn’t have any relationship to other field.
________ 4. Software Engineering is a means of solution.
________ 5. Scalability is irrelevant in Software Engineering.

SUBJECT TEACHER: APPROVED FOR


IMPLEMENTATION:
MODULE 1st – 2nd
PRELIM MR. KEEN ELIAS G. VIRTUDAZO
3 Meeting
Subject Teacher MR. WILBERT A. MAÑUSCA
School Director
Unit White Box Testing
Module White Box Testing
SE 101 Software Engineering 2 Units: 3.0 Page |4

SELF CHECK ANSWER KEY PR – 3.1.1


Answer:
1. True
2. False
3. False
4. True
5. False

SUBJECT TEACHER: APPROVED FOR


IMPLEMENTATION:
MODULE 1st – 2nd
PRELIM MR. KEEN ELIAS G. VIRTUDAZO
3 Meeting
Subject Teacher MR. WILBERT A. MAÑUSCA
School Director
Unit White Box Testing
Module White Box Testing
SE 101 Software Engineering 2 Units: 3.0 Page |5

STUDENT NAME: __________________________________ SECTION: __________________

PERFORMANCE TASK PR - 3.1.1


PERFORMANCE TASK TITLE: White Box Testing Activity

PERFORMANCE OBJECTIVE: After completing this activity, you should have a deeper understanding
on the basic concepts of white box testing.
TOOLS AND MATERIALS: Pen and paper

EQUIPMENT:

ESTIMATED COST: None

PROCESS/PROCEDURE: Follow the given steps/directions.


Direction: Answer the following query, explain comprehensively.
• Which do you think is better, white or black box testing? Explain your answer
comprehensively.
PRECAUTIONS:

ASSESSMENT METHOD: PERFORMANCE TASK CRITERIA CHECKLIST

SUBJECT TEACHER: APPROVED FOR


IMPLEMENTATION:
MODULE 1st – 2nd
PRELIM MR. KEEN ELIAS G. VIRTUDAZO
3 Meeting
Subject Teacher MR. WILBERT A. MAÑUSCA
School Director
Unit White Box Testing
Module White Box Testing
SE 101 Software Engineering 2 Units: 3.0 Page |6

STUDENT NAME: __________________________________ SECTION: __________________

PERFORMANCE TASK CRITERIA CHECK LIST PR - 2.1.1

CRITERIA SCORING
Did I . . .
1 2 3 4 5
1. Correctly explained by answer, in a comprehensive manner?
2. Create a document without grammatical flaws?
3
TEACHER’S REMARKS: ❑ QUIZ ❑ RECITATION ❑ PROJECT

GRADE:

5- Excellently Performed
4- Very Satisfactorily Performed
3- Satisfactorily Performed
2- Fairly Performed
1- Poorly Performed

_______________________________
TEACHER

Date: ______________________

SUBJECT TEACHER: APPROVED FOR


IMPLEMENTATION:
MODULE 1st – 2nd
PRELIM MR. KEEN ELIAS G. VIRTUDAZO
3 Meeting
Subject Teacher MR. WILBERT A. MAÑUSCA
School Director

You might also like