5 views

Original Title: 20061202 New Data Flow Testing

Uploaded by Umamageswari Kumaresan

- Longevity risk.pdf
- Untitled 1
- Copy of Core Java Book
- Interaction Diagram AdditionalFeatures
- Parallel Graph Colouring Shared Memory
- C Programming Style
- Islamic Banks - The Case of Bosnia and Herzegovina
- GFK2950 PACSystems RX3i Rx7i CPU Prog Ref Manual
- Excel VBA a Step by Step Guide to Learn and Master Excel VBA Programming
- Actions for Flash 5.pdf
- DataFlowTesting(2)
- a_var_is_useful
- Capital allocations
- 2013.06 SCOR Seminar Istanbul - Developing Internal Models
- Internal Model Approach.pptx
- Olympiad Combinat or Ics Chapter 4
- doc 4
- billing
- accntr
- 2-Overview of Data Mining Process

You are on page 1of 23

Mark New

Saturday 2nd December, 2006

Overview

Background

Define/Use testing

Slice-based testing

Background

Structural testing

Focus on variables

2 forms:

1. Define/Use testing

2. Program slice testing

Program Graphs

1

program Example()

3

4

staffDiscount = 0.1

totalPrice = 0

5

6

7

8

9

input(price)

while(price != -1) do

totalPrice = totalPrice + price

input(price)

od

11 if(totalPrice > 15.00) then

12 discount = (staffDiscount * totalPrice) + 0.50

13 else

14 discount = staffDiscount * totalPrice

15 fi

16 print(Discount: + discount)

17 finalPrice = totalPrice - discount

18 print(Final price: + finalPrice)

19 endprogram

Define/Use Testing

Define/Use Testing

A way to examine points where faults may

occur

itself

DEF(v, n): Node n in G(P) is a defining node of

var v in V iff value of v is defined at n.

Usage node (e.g. output x, a = 2+v, etc.):

USE(v, n): Node n in G(P) is a usage node of

var v in V iff value of v is used at n.

for some v in V

respectively.

DEF

DEF

USE

node of v (in the path).

DEF

DEF

USE

DEF

USE

Example

2 define nodes

DEF(price, 5)

DEF(price, 8)

Du-paths:

<5, 6>

<5, 6, 7>

<8, 9, 6>

<8, 9, 6, 7>

All are definition-clear.

2 use nodes

USE(price, 6)

USE(price, 7)

Definitions

I-def input

A-def assignment

All-Paths

define a set of test

coverage metrics

Rapps-Weyuker data

flow metrics

Defined in early

1980s

Relationship:

subsumption

between metrics

All-DU-Paths

All-Uses

All-C-Uses/Some-P-Uses

All-Defs

All-P-Uses/Some-C-Uses

All-P-Uses

All-Edges

All-Nodes

The Metrics

equivalent to Miller's metrics (Path Testing)

For the others, assume that define & usage

nodes have been defined for all variables

Metrics cont'd

T contains dc-paths from every DEF of v to a

USE of v.

T satisfies All-P-Uses for P iff T contains dcpaths from every DEF of v to every P-use of v.

T satisfies All P-Uses/Some C-Uses for P iff

for every var v in V, T contains dc-paths from

every DEF of v to every P-use of v if a def of v

has no P-uses, dc-path leads to at least 1 Cuse.

All-C-Uses/Some-P-Uses - vice-versa!

Metrics cont'd

V, T contains dc-paths from every DEF of v to

every USE of v and to the successor node of

each USE(v, n).

T satisfies All-DU-Paths for P iff for every var v

in V, T contains dc-paths from every DEF of v

to every USE of v and to the successor node of

each USE(v, n)

free.

Subsumption of Metrics

All-Paths

e.g. All-Paths stronger

than All-DU-Paths

All-Defs not

comparable to AllEdges/Nodes

Typically accepted

minimum metric: AllEdges

All-Paths often infeasible

All-DU-Paths

All-Uses

All-C-Uses/Some-P-Uses

All-Defs

All-P-Uses/Some-C-Uses

All-P-Uses

All-Edges

All-Nodes

Slice-Based Testing

What is a slice?

set of variables (in P) V

Slice on V at statement (fragment) n S(V, n)

S(V, n) is the set of node numbers of all

statements in P prior to n that contribute to the

values of variables in V at n.

Exclude all non-executable statements

Also exclude O-use, L-use, I-use nodes from

slices

Slice: Example

S(price, 5) = {5}

S(price, 6) = {5, 6, 8, 9}

S(price, 7) = {5, 6, 8, 9}

S(price, 8) = {8}

Use of Slices

When slice for DEF for var = slice for USE for

var, then path is definition-clear.

Summary

Define/Use

Rapps/Weyuker metrics

- Longevity risk.pdfUploaded byTiberiu Stavarus
- Untitled 1Uploaded byPrince Singh
- Copy of Core Java BookUploaded byRaJu SinGh
- Interaction Diagram AdditionalFeaturesUploaded bySeena Jassi
- Parallel Graph Colouring Shared MemoryUploaded by50111269
- C Programming StyleUploaded bya42ortiz
- Islamic Banks - The Case of Bosnia and HerzegovinaUploaded byajn05
- GFK2950 PACSystems RX3i Rx7i CPU Prog Ref ManualUploaded bycakendri
- Excel VBA a Step by Step Guide to Learn and Master Excel VBA ProgrammingUploaded byLuis Palafox
- Actions for Flash 5.pdfUploaded byEdson Morais
- DataFlowTesting(2)Uploaded byAshwani Khurwal
- a_var_is_usefulUploaded byanil
- Capital allocationsUploaded byAnne Mel Bariquit
- 2013.06 SCOR Seminar Istanbul - Developing Internal ModelsUploaded bytayko177
- Internal Model Approach.pptxUploaded byronnie1987
- Olympiad Combinat or Ics Chapter 4Uploaded byLucian Lazar
- doc 4Uploaded bySapana Malla
- billingUploaded byapi-253540656
- accntrUploaded byAnjali Saini
- 2-Overview of Data Mining ProcessUploaded byJason Kristianto
- Chapter 3 C# BasicsUploaded byAmexs Jonny Laivoi
- Fortran FormatUploaded byfparaggio797
- Integral graphsUploaded bydragance106
- learnpython-dia1.pdfUploaded byJorge Alberto B
- Conducting Experiments Using Opus ProfessionalUploaded byArnoud999
- calcriskUploaded bycamy0529
- PQCC : A Machine-Relative Compiler Technology (W. a. Wulf)Uploaded byforegam
- Neutrosophic Modeling of Investment ArchitecturesUploaded byAnonymous 0U9j6BLllB
- jobsheet 2.docxUploaded by-Shy Lee Vhy-
- 2011 2012 Waterloo Local Contest 2 October 2011 EnUploaded byAndreea Zaharia

- It 2353Uploaded byKumara Vel
- DM_lab_TT.xlsxUploaded byUmamageswari Kumaresan
- Course Plan SOAUploaded byUmamageswari Kumaresan
- C++ Apti n OOPSUploaded byUmamageswari Kumaresan
- ElocutionUploaded byUmamageswari Kumaresan
- Kvs Ldc 2014 ExamUploaded byUmamageswari Kumaresan
- 12. 2 marksUploaded bysaranya_cse4404
- Birch-09Uploaded byUmamageswari Kumaresan
- 4.Apr 2012.pdfUploaded bykarthickamsec
- Total QualityUploaded byUmamageswari Kumaresan
- ComSIS_pdcat06Uploaded byUmamageswari Kumaresan
- Importance of Agriculture in the Indian Economy--elocutionUploaded byUmamageswari Kumaresan
- PDS I SET 3Uploaded byUmamageswari Kumaresan
- Agriculture is the Main Occupation in IndiaUploaded byUmamageswari Kumaresan
- Patterson BookUploaded byUmamageswari Kumaresan
- Extract Visual BasedUploaded byUmamageswari Kumaresan
- Extract Visual BasedUploaded byUmamageswari Kumaresan
- Cse-ct and St Lab (IV-i)Uploaded byUmamageswari Kumaresan
- Use Case RelationshipsUploaded byUmamageswari Kumaresan
- CS2032 DWM QB.pdfUploaded byvelkarthi92
- Cs6551 Computer Networks and LabUploaded byUmamageswari Kumaresan
- Spread SpectrumUploaded byUmamageswari Kumaresan
- Steganography Past Present Future 552Uploaded bydiankusuma123
- Algorithm Question SetUploaded bylokenders801
- III Sem- Design Analysis Algorithm(1)Uploaded byMohan Devaraj
- Carrier Sense Multiple AccessUploaded byUmamageswari Kumaresan
- software enggg.pdfUploaded bySaravana Kumar
- CN PossibleUploaded byUmamageswari Kumaresan
- Lab Manual - Tcpip - It0405Uploaded bysaurabhkher19

- Management Information SystemUploaded byUmair Awan
- Simscape 3 Getting Started GuideUploaded byPavan Reddy
- UnidenUIP300Uploaded byPayphone.com
- Online SmartTest Setup v1.0Uploaded byAshwin Reddy
- OpenWPM 1 Million Site Tracking MeasurementUploaded byNanok
- Sample RFP ResponseUploaded byJason Friedlander
- Huawei Smart Hotel Solution BrochureUploaded byAdclick Hoa
- Hp g62 Compaq Cq62 Foxconn Star Federer Rev 1.0 SchUploaded byAntonio Pisciotta
- ContransTI-seminariumTI-T4Uploaded bykrajasekarantuti
- maquette cisco.txtUploaded byYoussef Moutahaddir
- 72E-164153-01 Rev a ADSP User GuideUploaded byAdvantec Srl
- Programming Standards GuideUploaded bypanh_71
- Lexmark MX410 SeriesUploaded bygeorge_adi_2200
- Reforming Defence ICTUploaded bykapsicum
- C# Chart_ Windows FormsUploaded byManoj Kumar G
- ME OEEUploaded byrupeshkrupak75
- MerLicSvrUploaded byPraveen Kumar
- ReadmeUploaded byFlash Dani
- 03 - Writing a TCL ScriptUploaded byavin29
- An 10722Uploaded byRaghavendra S Rao
- Data Protector 7.0x Upgrade to 8.x or 9.x - ZerofocusUploaded byJinu
- The Implementation of Tiny Encryption Algorithm on PIC18F4550Uploaded byEdi Permadi
- Secutiy in Cloud ComputingUploaded bysunuprvunl
- Hi Path 3000 Service ManualUploaded bysan
- Professional Services Skills MatrixUploaded byAnthony Lobosco
- LabManual_DSC_2ndCSE 2011Uploaded byPavan Krishna O
- Apollo User Manual.pdfUploaded byAngel Nahun Rivera
- ReadmeUploaded byAlex Fabricio Montalvo
- Load RunnerUploaded byhanharin
- AsmUploaded byKranthi Kumar