Leveraging Field Data for Impact Analysis and Regression Testing - - PowerPoint PPT Presentation

leveraging field data for impact analysis and regression
SMART_READER_LITE
LIVE PREVIEW

Leveraging Field Data for Impact Analysis and Regression Testing - - PowerPoint PPT Presentation

Leveraging Field Data for Impact Analysis and Regression Testing Alessandro Orso joint work with Taweesup Apiwattanapong Mary Jean Harrold {orso|term|harrold}@cc.gatech.edu This work was supported in part by National Science Foundation awards


slide-1
SLIDE 1

ESEC/FSE 2003

Leveraging Field Data for Impact Analysis and Regression Testing

Alessandro Orso

joint work with

Taweesup Apiwattanapong Mary Jean Harrold {orso|term|harrold}@cc.gatech.edu

This work was supported in part by National Science Foundation awards CCR-9988294, CCR-0096321, CCR-0205422, SBE-0123532, and EIA-0196145 to Georgia Tech, and by the State of Georgia to Georgia Tech under the Yamacraw Mission

slide-2
SLIDE 2

ESEC/FSE 2003

Motivation

Fundamental shift in SW development

  • Software virtually everywhere
  • Most computers interconnected
  • Large amount of user resources

Opportunity to use field data and resources in SE

  • Testing and analysis limited by the use of in-house

inputs and configurations

  • Limits can be overcome by augment these tasks with

field data

slide-3
SLIDE 3

ESEC/FSE 2003

Field Execution Data

Overall Picture

Program P Regression Testing Impact Analysis User User User User User User User User User User User User User User User User

slide-4
SLIDE 4

ESEC/FSE 2003

Gathering Field Data

m1

Program P

X X A2 X X X B2 X X X X B1 X X A1 m6 m5 m4 m3 m2 m1 m2 m4 m3 m5 m6 m1 m2 m4 m3 m5 m6 m1 m2 m4 m3 m5 m6

execution data

m1 m2 m4 m3 m5 m6 m1 m2 m4 m3 m5 m6

User A User B

C1 X X

slide-5
SLIDE 5

ESEC/FSE 2003

Impact Analysis

Assesses the effects of changes on a software system

Predictive: help decide which changes to perform and how to implement changes

Our approach

  • Program-sensitive impact analysis
  • User-sensitive impact analysis
slide-6
SLIDE 6

ESEC/FSE 2003

Program Sensitive Impact Analysis

Step 1

  • Identify user executions through

methods in C

  • Identify methods covered by

such executions

  • 1. Field execution data
  • 2. Change

Input: C={m2, m5} Step 2

  • Static forward slice from C

covered methods = {m1,m2,m3,m5,m6} forward slice = {m2,m4,m5,m6} Step 3

  • Intersect covered methods and

forward slice

X X A2 X X X B2 X X X X B1 X X A1 m6 m5 m4 m3 m2 m1 C1

Impact set = Output: {m2,m5,m6}

X X

slide-7
SLIDE 7

ESEC/FSE 2003

  • 1. Collective impact =

User-sensitive Impact Analysis

Collective impact

  • Percentage of executions through

at least one changed method

X X A2 X X X B2 X X X X B1 X X A1 C1

Input: Affected users

  • Percentage of users that executed

at least once one changed method 3/5 = 60% 3/3 = 100%

  • 2. Affected users =
  • 2. Change

Output: C={m5, m6} 60% 100%

  • 1. Field execution data

X X m6 m5 m4 m3 m2 m1

slide-8
SLIDE 8

ESEC/FSE 2003

Regression Testing

Performed after P is changed to P’ to provide confidence that

  • Changed parts behave as intended
  • Unchanged parts are not adversely

affected by modifications

Three important issues

  • Tests in T to rerun on P’ (selection)
  • New tests for P’ (augmentation)
  • Order of execution of tests (prioritization)
slide-9
SLIDE 9

ESEC/FSE 2003

Regression Testing Using Field Data

  • 1. Tests T’ to be rerun on P’ =

X X A2 X X X B2 X X X X B1 X X A1

  • 1. Field execution data

Input: Output: C={m2, m4} impact set = {m1,m2,m3,m5,m6}

X t3 X X X t2 X t1

  • 3. In-house tests for P
  • 2. Critical methods =
  • Compute the impact set for m
  • For each t in T’ mark methods in

impact set exercised by t

  • Remove marked methods from

impact set

X X X X

CM[m4] = {m1} CM[m2] = {m3,m5}

m6 m5 m4 m3 m2 m1 m6 m5 m4 m3 m2 m1

{t2, t3}

  • 2. Change

For each changed method m in C

  • Add all tests through m to T’
slide-10
SLIDE 10

ESEC/FSE 2003

Regression Testing Using Field Data

  • 1. Tests T’ to be rerun on P’ =

For each changed method m in C

  • Add all tests through m to T’

X X A2 X X X B2 X X X X B1 X X A1

  • 1. Field execution data

Input: Output: C={m2, m4} impact set = {m1,m2,m4,m6}

X t3 X X X t2 X t1

  • 3. In-house tests for P
  • 2. Critical methods =
  • Compute the impact set for m
  • For each t in T’ mark methods in

impact set exercised by t

  • Remove marked methods from

impact set

X X X X

CM[m4] = {m1} CM[m2] = {m3,m5}

m6 m5 m4 m3 m2 m1 m6 m5 m4 m3 m2 m1

{t2, t3} C={m2, m4}

  • 2. Change
slide-11
SLIDE 11

ESEC/FSE 2003

Empirical Studies

Subject

  • JABA: Java Architecture for Bytecode Analysis
  • 60 KLOC, 550 classes, 2,800 Methods

Data

  • Field data: 1,100 executions (14 users, 12 weeks)
  • In-house data: 195 test cases, 63% method

coverage

  • Changes: 20 real changes extracted from JABA’s

CVS repository

slide-12
SLIDE 12

ESEC/FSE 2003

Study 1: Impact Analysis

Research question

Does field data yield different results than in-house data in terms of impact sets?

Experimental setup

  • Computed impact sets for the 20 changes
  • Using field data
  • Using in-house data
  • Compared impact sets for the two datasets
slide-13
SLIDE 13

ESEC/FSE 2003

Study 1: Impact Analysis

200 400 600 800 1000 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 C16 C17 C18 C19 C20 Field InHouse Field - InHouse InHouse - Field

InHouse 100 96 636 Field Number of methods Changes

slide-14
SLIDE 14

ESEC/FSE 2003

Study 2: Regression Testing

Research question

Does the use of field data actually result in additional testing requirements?

Experimental setup

Computation of the set of critical methods for the 20 real changes

slide-15
SLIDE 15

ESEC/FSE 2003

Study 2: Regression Testing

#Critical Methods Changes

50 100 150 200 250 300 350 400 C1 C2 C3 C4 C5 C6 C7 C8 C9 C10 C11 C12 C13 C14 C15 C16 C17 C18 C19 C20

slide-16
SLIDE 16

ESEC/FSE 2003

Related Work

  • Perpetual/Residual testing

(Clarke, Osterweil, Richardson, and Young)

  • Expectation-Driven Event Monitoring (EDEM)

(Hilbert, Redmiles, and Taylor)

  • Echelon

(Srivastava and Thiagarajan)

  • Impact analysis based on whole-path profiling

(Law and Rothermel)

slide-17
SLIDE 17

ESEC/FSE 2003

Final Remarks

Conclusion

  • Two new techniques for impact analysis and

regression testing based on field data

  • Empirical evaluation on a real subject with real

users

  • Results showing that using field data

considerably affect these tasks

Open Issues and future work

  • Study on the stability of user behaviors
  • Collection of additional data
  • Clustering of field data
  • Capture and replay of users’ executions
slide-18
SLIDE 18

ESEC/FSE 2003

For more information:

http://gamma.cc.gatech.edu Questions?