Page 52 - DCAP305_PRINCIPLES_OF_SOFTWARE_ENGINEERING
P. 52
Principles of Software Engineering
Notes e.g. Int x;
if (x ==100) {};
In data-flow testing, the first step is to model the program as a control flow graph. This helps
to identify the control flow information in the program. In step 2, the associations between the
definitions and uses of the variables that is needed to be covered in a given coverage criterion
is established. We have discussed the concept of dataflow testing. The next section covers the
data-flow testing criteria and data-flow anomalies. A billing application is considered and
the corresponding control flow graphs are presented and annotated to explain the concept of
dataflow testing. Data-flow testing is a control flow testing technique which also examines the
lifecycle of data variables. Use of data-flow testing leads to a richer test suite concentrating on
improper use of data due to coding errors.
3.2.1 Data Flow Diagrams (DFD)
It is a graphical representation of flow of data through a system. It pictures a system as a network
of functional processes. The basis of DFD is a data flow graph, which pictorially represents
transformation on data as shown in Figure 3.1.
Figure 3.1: Data Flow Diagrams
In this diagram, the external entities provide input data for the processing. During the processing,
some intermediate data is generated. After final processing, the final output data is generated.
The data store is the repository of data.
The structured approach of system design requires extensive modelling of the system. Thus,
instead of making a complete model exhibiting the functionality of system, the DFD’s are created
46 LOVELY PROFESSIONAL UNIVERSITY