COMPARISON OF DATA FLOW TEST SELECTION CRITERIA

5.7 COMPARISON OF DATA FLOW TEST SELECTION CRITERIA

Having seen a relatively large number of test selection criteria based on the concepts of data flow and control flow, it is useful to find relationships among them. Given

a pair of test selection criteria, we should be able to compare the two. If we cannot compare them, we realize that they are incomparable. Rapps and Weyuker [3] defined the concept of an includes relationship to find out if, for a given pair of selection criteria, one includes the other. In the following, by a complete path we mean a path from the entry node of a flow graph to one of its exit nodes.

Definition: Given two test selection criteria c 1 and c 2 ,c 1 includes c 2 if for every def/use graph any set of complete paths of the graph that satisfies c 1 also satisfies c 2 .

Definition: Given two test selection criteria c 1 and c 2 ,c 1 strictly includes c 2 , denoted by c 1 →c 2 , provided c 1 includes c 2 and for some def/use graph there is

a set of complete paths of the graph that satisfies c 2 but not c 1 . It is easy to note that the “→” relationship is a transitive relation.

Moreover, given two criteria c 1 and c 2 , it is possible that neither c 1 →c 2 nor c 2 →c 1 holds, in which case we call the two criteria incomparable. Proving the strictly includes relationship or the incomparable relationship between two selection criteria in a programming language with arbitrary semantics may not be possible. Thus, to show the strictly includes rela- tionship between a pair of selection criteria, Rapps and Weyuker [3] have considered a restricted programming language with the following syntax:

Start statement:

start

Input statement: read x 1 , . . . ,x n , where x i , . . . ,n are variables.

Assignment statement: y ←f (x 1 , . . . ,x n ), where y, x i , . . . ,n are variables, and f is a function.

Output statement: print e 1 , . . . ,e n , where e 1 , . . . ,e n are output

values.

Unconditional transfer statement: goto m , where m is a label. Conditional transfer statement:

if p (x 1 , . . . ,x n ), then goto m, where p is a predicate.

Halt statement:

stop

5.8 FEASIBLE PATHS AND TEST SELECTION CRITERIA

All-c-uses/Some-p-uses All-p-uses/Some-c-uses

All-c-uses

All-p-uses

All-defs All-branches

All-statements

Figure 5.5 Relationship among DF (data flow) testing criteria. (From ref. 4. © 1988 IEEE.)

Frankl and Weyuker [4] have further extended the relationship; what they have proved has been summarized in Figure 5.5. For example, the all-paths selection criterion strictly includes the all-du-paths criterion. Similarly, the all-c-uses/some-p-uses criterion strictly includes the all-defs criterion.

However, we cannot find a strictly includes relationship between the pair

be a set of paths selected by the all-c-uses criterion with respect to a variable x . Now we cannot say with certainty whether or not the path set P c x satisfies the all-p-uses criterion with respect to the same variable x . Similarly, let P p

all-c-uses and all-p-uses. Let P c x

be a set of paths selected by the all-p-uses criterion with respect to the variable x . Now we cannot say with certainty whether or not the path set

P p x satisfies the all-c-uses criterion with respect to the same variable x . Thus, the two criteria all-c-uses and all-p-uses are incomparable. Note the relationship between data flow–based test selection criteria and control flow–based test selection criteria, as shown in Figure 5.5. The two control flow–based test selection criteria in Figure 5.5 are all-branches and all-statements. The all-p-uses criterion strictly includes the all-branches criterion, which implies that one can select more paths from a data flow graph of a program unit than from its control flow graph.

Dokumen yang terkait

ANALISIS DANA PIHAK KETIGA PADA PERBANKAN SYARIAH DI INDONESIA PERIODE TRIWULAN I 2002 – TRIWULAN IV 2007

40 502 17

ANALISIS KEMAMPUAN SISWA SMP DALAM MENYELESAIKAN SOAL PISA KONTEN SHAPE AND SPACE BERDASARKAN MODEL RASCH

69 778 11

Analisis Komparasi Internet Financial Local Government Reporting Pada Website Resmi Kabupaten dan Kota di Jawa Timur The Comparison Analysis of Internet Financial Local Government Reporting on Official Website of Regency and City in East Java

19 819 7

STUDI PENJADWALAN DAN RENCANA ANGGARAN BIAYA (RAB) PADA PROYEK PEMBANGUNAN PUSAT PERDAGANGAN CIREBON RAYA (PPCR) CIREBON – JAWA BARAT

34 235 1

PENGARUH PENGGUNAAN BLACKBERRY MESSENGER TERHADAP PERUBAHAN PERILAKU MAHASISWA DALAM INTERAKSI SOSIAL (Studi Pada Mahasiswa Jurusan Ilmu Komunikasi Angkatan 2008 Universitas Muhammadiyah Malang)

127 505 26

AN ANALYSIS OF DESCRIPTIVE TEXT WRITING COMPOSED BY THE HIGH AND THE LOW ACHIEVERS OF THE EIGHTH GRADE STUDENTS OF SMPN SUKORAMBI JEMBER

11 83 16

AN ANALYSIS OF LANGUAGE CONTENT IN THE SYLLABUS FOR ESP COURSE USING ESP APPROACH THE SECRETARY AND MANAGEMENT PROGRAM BUSINESS TRAINING CENTER (BTC) JEMBER IN ACADEMIC YEAR OF 2000 2001

3 95 76

A DISCOURSE ANALYSIS ON “SPA: REGAIN BALANCE OF YOUR INNER AND OUTER BEAUTY” IN THE JAKARTA POST ON 4 MARCH 2011

9 161 13

Improving the Eighth Year Students' Tense Achievement and Active Participation by Giving Positive Reinforcement at SMPN 1 Silo in the 2013/2014 Academic Year

7 202 3

THE INTEGRATION BETWEEN INDONESIA AND WORLD RICE MARKET

1 88 12