You are on page 1of 10

Chaper 2 : Software Testing techniques

I. General
Software testing techniques are the ways employed to test the application under test against
the functional or non-functional requirements gathered from business. Each testing technique helps to
find a specific type of defect. For example, Techniques which may find structural defects might not be
able to find the defects against the end-to-end business flow. Hence, multiple testing techniques are
applied in a testing project to conclude it with acceptable quality.
It is one of two parts of the Box Testing approach to software testing. Its counterpart, Blackbox
testing, involves testing from an external or end-user perspective. On the other hand, White box testing
in software engineering is based on the inner workings of an application and revolves around internal
testing.
The term “WhiteBox” was used because of the see-through box concept. The clear box or
WhiteBox name symbolizes the ability to see through the software’s outer shell (or “box”) into its inner
workings. Likewise, the “black box” in “Black Box Testing” symbolizes not being able to see the inner
workings of the software so that only the end-user experience can be tested.
Types Of Software Testing Techniques
There are two main categories of software testing techniques:
Static Testing Techniques are testing techniques which are used to find defects in Application
under test without executing the code. Static Testing is done to avoid errors at an early stage of the
development cycle and thus reducing the cost of fixing them.
Dynamic Testing Techniques are testing techniques that are used to test the dynamic behavior of
the application under test, that is by the execution of the code base. The main purpose of dynamic
testing is to test the application with dynamic inputs- some of which may be allowed as per
requirement (Positive testing) and some are not allowed (Negative Testing).
1. White box Testing techniques......................................2
A major White box testing technique is Code Coverage analysis. Code Coverage analysis
eliminates gaps in a Test Case suite. It identifies areas of a program that are not exercised by a set of
test cases. Once gaps are identified, you create test cases to verify untested parts of the code,
thereby increasing the quality of the software product
There are automated tools available to perform Code coverage analysis. Below are a few
coverage analysis techniques a box tester can use:
Statement Coverage:- This technique requires every possible statement in the code to be
tested at least once during the testing process of software engineering.
Branch Coverage – This technique checks every possible path (if-else and other conditional
loops) of a software application.
Apart from above, there are numerous coverage types such as Condition Coverage, Multiple
Condition Coverage, Path Coverage, Function Coverage etc. Each technique has its own merits and
attempts to test (cover) all parts of software code. Using Statement and Branch coverage you generally
attain 80-90% code coverage which is sufficient.
2.1 . Test the program’s progress
STEP 1) UNDERSTAND THE SOURCE CODE
The first thing a tester will often do is learn and understand the source code of the application.
Since white box testing involves the testing of the inner workings of an application, the tester must be
very knowledgeable in the programming languages used in the applications they are testing. Also, the
testing person must be highly aware of secure coding practices. Security is often one of the primary
objectives of testing software. The tester should be able to find security issues and prevent attacks from
hackers and naive users who might inject malicious code into the application either knowingly or
unknowingly.
STEP 2) CREATE TEST CASES AND EXECUTE
The second basic step to white box testing involves testing the application’s source code for
proper flow and structure. One way is by writing more code to test the application’s source code. The
tester will develop little tests for each process or series of processes in the application. This method
requires that the tester must have intimate knowledge of the code and is often done by the developer.
Other methods include Manual Testing, trial, and error testing and the use of testing tools as we will
explain further on in this article.
2.2 . Check the control structure....................................2
A major White box testing technique is Code Coverage analysis. Code Coverage analysis
eliminates gaps in a Test Case suite. It identifies areas of a program that are not exercised by a set of
test cases. Once gaps are identified, you create test cases to verify untested parts of the code, thereby
increasing the quality of the software product

There are automated tools available to perform Code coverage analysis. Below are a few
coverage analysis techniques a box tester can use:

Statement Coverage:- This technique requires every possible statement in the code to be tested
at least once during the testing process of software engineering.
Branch Coverage – This technique checks every possible path (if-else and other conditional
loops) of a software application.

Apart from above, there are numerous coverage types such as Condition Coverage, Multiple
Condition Coverage, Path Coverage, Function Coverage etc. Each technique has its own merits and
attempts to test (cover) all parts of software code. Using Statement and Branch coverage you generally
attain 80-90% code coverage which is sufficient.
3 Black box Testing
Black Box Testing is a software testing method in which the functionalities of software
applications are tested without having knowledge of internal code structure, implementation details and
internal paths. Black Box Testing mainly focuses on input and output of software applications and it is
entirely based on software requirements and specifications. It is also known as Behavioral Testing.

The above Black-Box can be any software system you want to test. For Example, an operating
system like Windows, a website like Google, a database like Oracle or even your own custom
application. Under Black Box Testing, you can test these applications by just focusing on the inputs
and outputs without knowing their internal code implementation. Consider the following video tutorial-
3.1 Equivalent partition
Equivalence Partitioning Method is also known as Equivalence class partitioning (ECP). It is
a software testing technique or black-box testing that divides input domain into classes of data, and
with the help of these classes of data, test cases can be derived. An ideal test case identifies class of
error that might require many arbitrary test cases to be executed before general error is observed.
In equivalence partitioning, equivalence classes are evaluated for given input conditions.
Whenever any input is given, then type of input condition is checked, then for this input conditions,
Equivalence class represents or describes set of valid or invalid states.
3.2 . Marginal value analysis
The basis of Marginal Value Analysis (PTGTB) is to check the boundaries at the partitions
(rediscover the equivalent Partitioning Technique!). PT is an extension of PVTD. The minimum and
maximum values of a partition are the boundary values of this technique.
We have found that it is more likely to find defects at the boundary of a partition (Example: A
dev uses> 10 instead of> = 10 for a condition). The equivalent partition alone is not enough to catch
such an error. Therefore, it is necessary to identify a new technique that can detect anomalies at the
boundary of the generated partition.
Marginal value analysis is possible at all test levels and is mainly used for a range of numbers,
dates and times.
3.3. Technique Cause – Effect Graphing
Cause-effect graph comes under the black box testing technique which underlines the
relationship between a given result and all the factors affecting the result. It is used to write dynamic
test cases.
The dynamic test cases are used when code works dynamically based on user input. For
example, while using email account, on entering valid email, the system accepts it but, when you enter
invalid email, it throws an error message. In this technique, the input conditions are assigned with
causes and the result of these input conditions with effects.
Cause-Effect graph technique is based on a collection of requirements and used to determine
minimum possible test cases which can cover a maximum test area of the software.
The main advantage of cause-effect graph testing is, it reduces the time of test execution and
cost.
This technique aims to reduce the number of test cases but still covers all necessary test cases
with maximum coverage to achieve the desired application quality.
Cause-Effect graph technique converts the requirements specification into a logical relationship
between the input and output conditions by using logical operators like AND, OR and NOT.
6. The Art of Debugging
Debugging, in computer programming and engineering, is a multistep process that involves
identifying a problem, isolating the source of the problem and then either correcting the problem or
determining a way to work around it. The final step of debugging is to test the correction or
workaround and make sure it works.
In software development, the debugging process begins when a developer locates a code error
in a computer program and is able to reproduce it. Debugging is part of the software testing process and
is an integral part of the entire software development lifecycle.
In hardware development, the debugging process looks for hardware components that are not
installed or configured correctly. For example, an engineer might run a JTAG connection test to debug
connections on an integrated circuit.
6.1 . Debugging process
Debugging :
Debugging is the process of finding and resolving defects or problems within a computer
program that prevent correct operation of computer software or a system.
Need for debugging:
Once errors are known during a program code, it’s necessary to initial establish the precise
program statements liable for the errors and so to repair them.
Challenges in Debugging:
There are lot of problems at the same time as acting the debugging. These are the following:
Debugging is finished through the individual that evolved the software program and it’s miles
difficult for that person to acknowledge that an error was made.
Debugging is typically performed under a tremendous amount of pressure to fix the supported
error as quick as possible.
It can be difficult to accurately reproduce input conditions.
Compared to the alternative software program improvement activities, relatively little research,
literature and formal preparation exist at the procedure of debugging.
Debugging Approaches:
The following are a number of approaches popularly adopted by programmers for debugging.
Brute Force Method:
This is the foremost common technique of debugging however is that the least economical
method. during this approach, the program is loaded with print statements to print the intermediate
values with the hope that a number of the written values can facilitate to spot the statement in error.
This approach becomes a lot of systematic with the utilisation of a symbolic program (also known as a
source code debugger), as a result of values of various variables will be simply checked and
breakpoints and watch-points can be easily set to check the values of variables effortlessly.
Backtracking:
This is additionally a reasonably common approach. during this approach, starting from the
statement at which an error symptom has been discovered, the source code is derived backward till the
error is discovered. sadly, because the variety of supply lines to be derived back will increase, the
quantity of potential backward methods will increase and should become unimaginably large so
limiting the utilisation of this approach.
Cause Elimination Method:
In this approach, a listing of causes that may presumably have contributed to the error symptom
is developed and tests are conducted to eliminate every error. A connected technique of identification
of the error from the error symptom is that the package fault tree analysis.

Program Slicing:
This technique is analogous to backtracking. Here the search house is reduced by process slices. A
slice of a program for a specific variable at a particular statement is that the set of supply lines
preceding this statement which will influence the worth of that variable
Debugging Guidelines:
Debugging is commonly administrated by programmers supported their ingenuity. The subsequent
are some general tips for effective debugging:
Many times debugging needs an intensive understanding of the program style. making an attempt to
rectify supported a partial understanding of the system style and implementation might need an
excessive quantity of effort to be placed into debugging even straightforward issues.
Debugging might generally even need a full plan of the system. In such cases, a typical mistake that
novice programmers usually create is trying to not fix the error however its symptoms.
One should be watched out for the likelihood that a slip correction might introduce new errors. so
when each spherical of error-fixing, regression testing should be administrated.
6.2 . Psychological review
- Abstract
This paper proposes a view of computer program debugging, which tackles some of the
simplifying short-comings of existing models. The paper begins by reviewing some of the existing
models of debugging and their assumptions, before looking in more detail at one of the dominant
paradigms for investigating debugging, that of predicting bug detection success. A reanalysis of the bug
detection data from Gilmore and Green (1988) provides evidence that the assumptions of existing
models are not valid. The important part of this result is the realisation that these assumptions have
been derived from a view of debugging as fault diagnosis, rather than as a critical component of design.
In conclusion, the paper describes the important features of debugging as a design activity, before
outlining some predictions and implications which can be derived from the model.
6.3 . Debugging Approach
Debugging :
Debugging is the process of finding and resolving defects or problems within a computer
program that prevent correct operation of computer software or a system.
Need for debugging:
Once errors are known during a program code, it’s necessary to initial establish the precise
program statements liable for the errors and so to repair them.
Challenges in Debugging:
There are lot of problems at the same time as acting the debugging. These are the following:
Debugging is finished through the individual that evolved the software program and it’s miles
difficult for that person to acknowledge that an error was made.
Debugging is typically performed under a tremendous amount of pressure to fix the supported
error as quick as possible.
It can be difficult to accurately reproduce input conditions.
Compared to the alternative software program improvement activities, relatively little research,
literature and formal preparation exist at the procedure of debugging.
Debugging Approaches:
The following are a number of approaches popularly adopted by programmers for debugging.
Brute Force Method:
This is the foremost common technique of debugging however is that the least economical
method. during this approach, the program is loaded with print statements to print the intermediate
values with the hope that a number of the written values can facilitate to spot the statement in error.
This approach becomes a lot of systematic with the utilisation of a symbolic program (also known as a
source code debugger), as a result of values of various variables will be simply checked and
breakpoints and watch-points can be easily set to check the values of variables effortlessly.
Backtracking:
This is additionally a reasonably common approach. during this approach, starting from the
statement at which an error symptom has been discovered, the source code is derived backward till the
error is discovered. sadly, because the variety of supply lines to be derived back will increase, the
quantity of potential backward methods will increase and should become unimaginably large so
limiting the utilisation of this approach.
Cause Elimination Method:
In this approach, a listing of causes that may presumably have contributed to the error symptom
is developed and tests are conducted to eliminate every error. A connected technique of identification
of the error from the error symptom is that the package fault tree analysis.
Program Slicing:
This technique is analogous to backtracking. Here the search house is reduced by process slices.
A slice of a program for a specific variable at a particular statement is that the set of supply lines
preceding this statement which will influence the worth of that variable
Debugging Guidelines:
Debugging is commonly administrated by programmers supported their ingenuity. The
subsequent are some general tips for effective debugging:
Many times debugging needs an intensive understanding of the program style. making an
attempt to rectify supported a partial understanding of the system style and implementation might need
an excessive quantity of effort to be placed into debugging even straightforward issues.
https://www.guru99.com/white-box-testing.html
https://www.guru99.com/black-box-testing.html
https://www.javatpoint.com/cause-and-effect-graph-technique-in-black-box-testing
https://www.geeksforgeeks.org/software-engineering-debugging-approaches/
https://www.sciencedirect.com/science/article/abs/pii/000169189190009O
https://www.geeksforgeeks.org/software-engineering-debugging-approaches/

You might also like