Open-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.
In order to perform white-box testing on an application, a tester needs to know the internal workings of the code. White box testing involves testing the product's underlying structure, architecture, and code to validate input-output flow and enhance design, usability, and security.
The white box test method is the one that looks at the code and structure of the product to be tested and uses that knowledge to perform the tests. Designing white box test cases require a thorough knowledge of the internal structure of a program, and therefore white box testing is also called structural testing.
The other name of white box testing is clear box testing because unlike black box testing the code is available and visible. A few of the other names given to white box testing are open box testing, transparent box testing, glass testing, and code-based testing. White box testing is called "open box" because the code is visible to the tester during the examination.
Types of White Box Testing:
White Box testing can be classified into
any of the following types:
Unit Testing: Unit testing is performed on each unit or block
of code as it is developed. The developer tests a few
lines of code, a single function or an object for correct working.
Unit testing ensures that each
component performs as intended. Bugs
identified in this stage are cheaper and easy to fix. Unit
testing is helpful as it identifies the majority of errors early in the
development cycle, making them cheaper and easier to fix.
Integration Testing:
This method is concerned with combining individual unit or components of the
source code and testing them as a group. The purpose of this testing is to
expose any errors in the interaction of different components together.
Integration testing
is performed to check that modules/components operate as intended when
combined, i.e. to ensure that modules that performed fine independently do not
have difficulties when merged.
White Box Testing Techniques:
There are Different Types of White Box
testing techniques available to use. Following are important White Box Testing Techniques:
- Statement Coverage
- Branch Coverage
- Path Coverage
- Decision Coverage
- Condition Coverage
- Multiple Condition Coverage
- Basis path Testing
- Loop testing
Statement Coverage: Statement coverage is the most basic form of code coverage
analysis in white box software testing. This technique includes every
possible statement in the code. In this technique, the tester tests every
statement at least once, thereby assuring that all of the code is tested.
A statement is a line of code or an instruction. Statement coverage
ensures
every single line of code is tested.
This technique examines each line of code at least once. In this technique, the aim is to traverse all
statements at least once. Hence, each line of code is tested.
Branch
Coverage: Branch coverage is a white box software
testing technique that measures the number of branches of the control
structures that have been executed. In branch coverage, we check if each branch is processed at least once.
This technique is running a series of tests to ensure that all branches
are tested at least once.
Branch coverage ensures every branch is
tested. In this technique,
test cases are designed so that each branch from all decision points is
traversed at least once. Using this technique, each possible path
or decision point of a software application is checked for accuracy.
Decision Coverage: This includes
testing every possible decision condition and other conditional loops at least
once. Decision Coverage is a white box testing methodology that
reports the true or false results of each Boolean expression present in the
source code.
Condition Coverage: This technique covers all individual conditions. In this technique, all individual conditions are
checked. With condition coverage, all of the conditions in the program to be evaluate
as both true and false at least once. The
purpose of condition coverage is to examine the outcome of each logical
condition.
Multiple Condition Coverage: In this testing technique,
all the different combinations of conditions for each decision are evaluated.
Basis
Path Testing: Each independent path in the code is
taken for testing. In this
technique, control flow graphs are created from either code or flowchart. Cyclomatic
complexity is then calculated to define the number of independent paths so that
the minimal number of test cases can be designed for each independent path.
Loop
Testing: The technique focuses on
loops. 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. This technique checks the reliability of loops, and
involves simple, nested and concatenated loops.
0 Comments
if you have any doubts plz let me know...