Unit-2 (ST) - F
Unit-2 (ST) - F
__________________________________________________________________________________________
Prepared by: Prof. (Dr.) Kuldeep Chouhan 1
Shivalik College of Engineering, Dehradun
Department of Computer Science and Engineering
Note: Black box testing is a software testing methodology in which the tester analyzes the
functionality of an application without a thorough knowledge of its internal design. On the other hand,
in white box testing, the tester is knowledgeable of the internal design of the application and analyzes
it during testing.
A control flow graph (or simply, flow graph) is a directed graph which represents the control
structure of a program or module. A control flow graph (V, E) has V number of nodes/vertices and
E number of edges in it. A control graph can also have:
Junction Node – a node with more than one arrow entering it.
Decision Node – a node with more than one arrow leaving it.
Region – area bounded by edges and nodes (area outside the graph is also counted as a region.).
__________________________________________________________________________________________
Prepared by: Prof. (Dr.) Kuldeep Chouhan 2
Shivalik College of Engineering, Dehradun
Department of Computer Science and Engineering
__________________________________________________________________________________________
Prepared by: Prof. (Dr.) Kuldeep Chouhan 3
Shivalik College of Engineering, Dehradun
Department of Computer Science and Engineering
Figure: Do while
Test coverage criterion is a rule or a collection of rules that impose test requirements on a test set.
Test coverage level (of a test set T with respect to a set of test requirements TR) is the ratio of the
number of the test requirements in TR that are satisfied by T to the size of TR.
In other words, in software testing, test coverage is defined as a statistic that indicates the quantity
of testing completed by a collection of tests. It will entail obtaining information about which sections
of a program are executed when the test suite is performed in order to establish whether conditional
statement branches have been taken.
__________________________________________________________________________________________
Prepared by: Prof. (Dr.) Kuldeep Chouhan 4
Shivalik College of Engineering, Dehradun
Department of Computer Science and Engineering
To illustrate the approach of data flow testing, assume that each statement in the program
assigned a unique statement number. For a statement number S-
DEF(S) = {X | statement S contains the definition of X}
USE(S) = {X | statement S contains the use of X}
If a statement is a loop or if condition, then its DEF set is empty and USE set is based on the
condition of statement s.
__________________________________________________________________________________________
Prepared by: Prof. (Dr.) Kuldeep Chouhan 5
Shivalik College of Engineering, Dehradun
Department of Computer Science and Engineering
Example:
1. read x, y; 2. if(x>y) 3. a = x+1 else 4. a = y-1 5. print a;
x 1 2, 3
y 1 2, 4
a 3, 4 5
__________________________________________________________________________________________
Prepared by: Prof. (Dr.) Kuldeep Chouhan 6
Shivalik College of Engineering, Dehradun
Department of Computer Science and Engineering
Testing is the process of evaluating a system or its component(s) with the intent to find whether it
satisfies the specified requirements or not. In simple words, testing is executing a system in order to
identify any gaps, errors, or missing requirements in contrary to the actual requirements.
According to ANSI/IEEE 1059 standard, Testing can be defined as - A process of analyzing a software
item to detect the differences between existing and required conditions (that is defects/errors/bugs)
and to evaluate the features of the software item.
Why We Use Testing: Testing a product throughout its development lifecycle builds customer trust
and satisfaction, as it provides visibility into the product's strong and weak points. By the time
customers receive the product, it has been tried and tested multiple times and delivers on quality.
Different companies have different designations for people who test the software on the basis of their
experience and knowledge such as Software Tester, Software Quality Assurance Engineer, QA Analyst,
etc.
__________________________________________________________________________________________
Prepared by: Prof. (Dr.) Kuldeep Chouhan 7
Shivalik College of Engineering, Dehradun
Department of Computer Science and Engineering
Slicing or program slicing is a technique used in software testing which takes a slice or a group of
program statements in the program for testing particular test conditions or cases that may affect
a value at a particular point of interest. It can also be used for the purpose of debugging in order
to find the bugs more easily and quickly.
__________________________________________________________________________________________
Prepared by: Prof. (Dr.) Kuldeep Chouhan 8
Shivalik College of Engineering, Dehradun
Department of Computer Science and Engineering
For knowledge: The other names of structural testing include clear box testing, open box testing, logic
driven testing or path driven testing.
Test Gap Analysis: Test Gap Analysis is the process of identifying these gaps where new code has
been deployed but hasn't been tested yet. This requires a combination of static analysis of all code
changes and dynamic analysis of all current testing. By comparing these two analyses, you can easily
see where any gaps are.
__________________________________________________________________________________________
Prepared by: Prof. (Dr.) Kuldeep Chouhan 9
Shivalik College of Engineering, Dehradun
Department of Computer Science and Engineering
Gaps in Process: Process gaps are inefficiencies and failures that make a business process less than
optimal. This could be due to an external factor—for example, having to prod a client or co-worker
for approval on a document—or an internal factor, such as an employee having to look up information
or enter data manually.
Redundancies in Software Testing: Informally, a software system is redundant when it performs the
same functionality through the execution of different elements. Redundancy has been extensively
exploited in many software engineering techniques, for example for fault-tolerance and reliability
engineering, and in self-adaptive and self-healing programs.
Redundancy is a system design in which a component is duplicated so if it fails there will be
a backup.
__________________________________________________________________________________________
Prepared by: Prof. (Dr.) Kuldeep Chouhan 11