Code Change Impact Analysis for Testing Configurable Software - - PowerPoint PPT Presentation

code change impact analysis for testing configurable
SMART_READER_LITE
LIVE PREVIEW

Code Change Impact Analysis for Testing Configurable Software - - PowerPoint PPT Presentation

Code Change Impact Analysis for Testing Configurable Software Systems Mithun Acharya ABB Corporate Research Raleigh NC USA ABB: A power and automation company >125 years, >100 nations, ~150,000 employees Power products and electronics,


slide-1
SLIDE 1

Code Change Impact Analysis for Testing Configurable Software Systems

Mithun Acharya ABB Corporate Research Raleigh NC USA

slide-2
SLIDE 2

ABB: A power and automation company

2

>125 years, >100 nations, ~150,000 employees Power products and electronics, Control Systems, Robotics, Smart Grid, Renewable Energy, …

slide-3
SLIDE 3

ABB Corporate Research Industrial Software Systems (ISS) research group

USA Germany Switzerland Poland Sweden India China 7 research centers worldwide Raleigh, NC 3

slide-4
SLIDE 4

Software in ABB

4

Hardware with software inside Software with few hardware components Pure Software

slide-5
SLIDE 5

5

Software Evolution: A CSS constantly changes

Hundreds of such changes committed daily

slide-6
SLIDE 6

Change Control Board meetings

6

Change impact visualizations for managers for decision making Change impact at the code level for developers Unit/module-level change impact for testers

slide-7
SLIDE 7

Imp: Code change impact analysis for C/C++ programs

7

C23586 BUILD SERVER Impact database

Impact of C23567 Impact of C23586 Impact of C23712 Impact of changes since last nightly build …

NIGHTLY BUILD Version control SERVER CHECKOUT IMP

slide-8
SLIDE 8

Quantifiable risk/cost analysis of changes to CSS

8 Automated Dependency Analysis Automated Risk/Cost Analysis Automated What-If Analysis

Will changes to foo.c, affect Bob’s module? Dependency analysis 3 days to release!!! Should I implement this feature or bug fix? What is the ‘best’ way to fix this bug or implement that new feature?

Automated Regression Testing

Should I re-run ALL of my test suite for this change? New tests required? Overlay change impact with risky areas in code

Test suite

3941 lines vs. 6 lines

slide-9
SLIDE 9

Program and System Dependence Graphs for Slicing

9

void main() { int i = 1; int sum = 0; while (i<11) { sum = add(sum, i); i = add(i, 1); } printf("sum = %d\n", sum); printf("i = %d\n", i); } static int add(int a, int b) { return(a+b); } Code/Image Source: GrammaTech

PDG for add Program Dependence Graph (PDG) for main System Dependence Graph (SDG)

slide-10
SLIDE 10

Making impact analysis practical and useful

10

slide-11
SLIDE 11

Making impact analysis practical and useful

10

Mithun Acharya, Brian Robinson. Practical Change Impact Analysis based on Static Program Slicing for Industrial Software Systems. ICSE 2011 SEiP, FSE 2012 (tool demo) Mithun Acharya, Xiao Qu, Brian Robinson. Cross-System Change Impact Analysis Using Test Cases. Under submission.

Scaling beyond million lines

slide-12
SLIDE 12

Making impact analysis practical and useful

10

Mithun Acharya, Brian Robinson. Practical Change Impact Analysis based on Static Program Slicing for Industrial Software Systems. ICSE 2011 SEiP, FSE 2012 (tool demo) Mithun Acharya, Xiao Qu, Brian Robinson. Cross-System Change Impact Analysis Using Test Cases. Under submission.

Testing configurable systems Scaling beyond million lines

Xiao Qu, Mithun Acharya, Brian Robinson. Configuration Selection Using Code Change Impact Analysis for Regression Testing. ICSM 2012 Xiao Qu, Mithun Acharya, Brian Robinson. Impact Analysis of Configuration Changes for Test Case Selection. ISSRE 2011

slide-13
SLIDE 13

Making impact analysis practical and useful

10

Mithun Acharya, Brian Robinson. Practical Change Impact Analysis based on Static Program Slicing for Industrial Software Systems. ICSE 2011 SEiP, FSE 2012 (tool demo) Mithun Acharya, Xiao Qu, Brian Robinson. Cross-System Change Impact Analysis Using Test Cases. Under submission.

Testing configurable systems Regression test selection Scaling beyond million lines

Xiao Qu, Mithun Acharya, Brian Robinson. Configuration Selection Using Code Change Impact Analysis for Regression Testing. ICSM 2012 Xiao Qu, Mithun Acharya, Brian Robinson. Impact Analysis of Configuration Changes for Test Case Selection. ISSRE 2011 Tingting Yu, Xiao Qu, Mithun Achayra, Gregg Rothermel. Oracle-Based Regression Test

  • Selection. Under submission.
slide-14
SLIDE 14

What configurations should we select for retesting?

11

Mithun Acharya, Brian Robinson. Practical Change Impact Analysis based on Static Program Slicing for Industrial Software Systems. ICSE 2011 SEiP, FSE 2012 (tool demo) Mithun Acharya, Xiao Qu, Brian Robinson. Cross-System Change Impact Analysis Using Test Cases. Under submission.

Testing configurable systems Regression test selection Scaling beyond million lines

Xiao Qu, Mithun Acharya, Brian Robinson. Configuration Selection Using Code Change Impact Analysis for Regression Testing. ICSM 2012 Xiao Qu, Mithun Acharya, Brian Robinson. Impact Analysis of Configuration Changes for Test Case Selection. ISSRE 2011 Tingting Yu, Xiao Qu, Mithun Achayra, Gregg Rothermel. Oracle-Based Regression Test

  • Selection. Under submission.
slide-15
SLIDE 15

Regression testing of CSS with code change impact analysis

12 Automated Dependency Analysis Automated Risk/Cost Analysis Automated What-If Analysis

Will changes to foo.c, affect Bob’s module? Dependency analysis 3 days to release!!! Should I implement this feature or bug fix? What is the ‘best’ way to fix this bug or implement that new feature?

Automated Regression Testing

Should I re-run ALL of my test suite for this change? New tests required? Overlay change impact with risky areas in code

Test suite

3941 lines vs. 6 lines

slide-16
SLIDE 16

Outline

Motivation Approach Implementation Empirical Evaluation Conclusions

16

slide-17
SLIDE 17

Configurable Software Systems

  • Software that can be customized through a set of options
  • Example: Internet Explorer

17

slide-18
SLIDE 18

Configurable Software Systems

  • Software that can be customized through a set of options
  • Example: Internet Explorer

Configurable option: “Pop-up Blocker” Values: ON, OFF 18

slide-19
SLIDE 19

Internet Explorer Configurations

C1 C2 … Pop Up Blocker ON ON … Google Toolbar Disabled Enabled … Do Not Track Yes Yes … … … … … 19

slide-20
SLIDE 20

Internet Explorer Configurations

C1 C2 … Pop Up Blocker ON ON … Google Toolbar Disabled Enabled … Do Not Track Yes Yes … … … … … Option 20

slide-21
SLIDE 21

Internet Explorer Configurations

C1 C2 … Pop Up Blocker ON ON … Google Toolbar Disabled Enabled … Do Not Track Yes Yes … … … … … Option Value 21

slide-22
SLIDE 22

Internet Explorer Configurations

C1 C2 … Pop Up Blocker ON ON … Google Toolbar Disabled Enabled … Do Not Track Yes Yes … … … … … Configuration instance C1 = {ON, Disabled, Yes, …} Option Value 22

slide-23
SLIDE 23

Internet Explorer Configurations

C1 C2 … Pop Up Blocker ON ON … Google Toolbar Disabled Enabled … Do Not Track Yes Yes … … … … … Configuration instance C1 = {ON, Disabled, Yes, …} Option Value Configuration C1 23

slide-24
SLIDE 24

Faulty System Behavior under Certain Configurations

I have discovered that using the newly released IE 7 with Google Toolbar = Enabled can cause the right-click menu to lose the “Open In New Tab” option

Impact of Configurations on System Behavior

24

slide-25
SLIDE 25

Impact of Configuration on System Behavior

To fix this, open IE7, click “Tools > Manage Add-ons > Disable Google Toolbar”

25

slide-26
SLIDE 26

Test Case: Open IE7, Right Click a link on webpage

C1 C2 Pop Up Blocker ON ON … Google Toolbar Disabled Enabled … Do Not Track Yes Yes … … … … … 26

slide-27
SLIDE 27

Test Case: Open IE7, Right Click a link on webpage

C1 C2 Pop Up Blocker ON ON … Google Toolbar Disabled Enabled … Do Not Track Yes Yes … … … … … Test: PASS 27

slide-28
SLIDE 28

Test Case: Open IE7, Right Click a link on webpage

C1 C2 Pop Up Blocker ON ON … Google Toolbar Disabled Enabled … Do Not Track Yes Yes … … … … … Test: PASS Test: FAIL No “Open in New Tab” 28

slide-29
SLIDE 29

Test Case: Open IE7, Right Click a link on webpage

C1 C2 Pop Up Blocker ON ON … Google Toolbar Disabled Enabled … Do Not Track Yes Yes … … … … … Test: PASS Test: FAIL No “Open in New Tab” A test case that passes with one configuration may fail with another 29

slide-30
SLIDE 30

Configurations control system execution IE7 IE7

30

slide-31
SLIDE 31

Configurations control system execution

C1 = {ON, disabled, Yes, …}

IE7 IE7

31

slide-32
SLIDE 32

Configurations control system execution

Test: PASS C1 = {ON, disabled, Yes, …}

IE7 IE7

32

slide-33
SLIDE 33

Configurations control system execution

Test: PASS C2 = {ON, enabled, Yes, …} C1 = {ON, disabled, Yes, …}

IE7 IE7

33

slide-34
SLIDE 34

Configurations control system execution

Test: FAIL Test: PASS C2 = {ON, enabled, Yes, …} C1 = {ON, disabled, Yes, …}

IE7 IE7

34

slide-35
SLIDE 35

Configurations control system execution

Test: FAIL Test: PASS C2 = {ON, enabled, Yes, …} C1 = {ON, disabled, Yes, …}

IE7 IE7

Can we statically approximate how configurations (options) control system execution?

35

slide-36
SLIDE 36

Challenges for testing configurable systems

36

slide-37
SLIDE 37

Challenges for testing configurable systems

n options 2n configurations 37

slide-38
SLIDE 38

Challenges for testing configurable systems

n options 2n configurations

IE7 IE5

Product evolves 38

slide-39
SLIDE 39

Challenges for testing configurable systems

n options 2n configurations

IE7 IE5

T = {t1, t2, t3, t4, t5} T’ = {t2, t5} Test case selection Product evolves 39

slide-40
SLIDE 40

Challenges for testing configurable systems

n options 2n configurations

IE7 IE5

T = {t1, t2, t3, t4, t5} T’ = {t2, t5} {C1, C2, C3, C4, C5} {C1, C5} Configuration selection Test case selection Product evolves 40

slide-41
SLIDE 41

Reducing the exponential number of configurations to a manageable size

Configuration Sampling

41

slide-42
SLIDE 42

{C1, C2, C3, C4, C5, …}

IE7

T = {t1, t2, t3, t4, t5}

Reducing the exponential number of configurations to a manageable size

Configuration Sampling

Exponentially large set 42

slide-43
SLIDE 43

{C1, C2, C3, C4, C5, …} {C1, C3, C4}

IE7

T = {t1, t2, t3, t4, t5} Sampling

Reducing the exponential number of configurations to a manageable size

Configuration Sampling IE7

Exponentially large set Manageable size set 43

slide-44
SLIDE 44

{C1, C2, C3, C4, C5, …} {C1, C3, C4}

IE7

T = {t1, t2, t3, t4, t5} T’ = {t1, t2, t3, t4, t5} Sampling No test case selection

Reducing the exponential number of configurations to a manageable size

Configuration Sampling IE7

Exponentially large set Manageable size set 44

slide-45
SLIDE 45

{C1, C2, C3, C4, C5, …} {C1, C3, C4}

IE7

T = {t1, t2, t3, t4, t5} T’ = {t1, t2, t3, t4, t5} Sampling No test case selection

Reducing the exponential number of configurations to a manageable size

Configuration Sampling

Example: Configuration Interaction Testing (CIT)

IE7

Exponentially large set Manageable size set 45

slide-46
SLIDE 46

{C1, C2, C3, C4, C5, …} {C1, C3, C4}

IE7

T = {t1, t2, t3, t4, t5} T’ = {t1, t2, t3, t4, t5} Sampling No test case selection

Reducing the exponential number of configurations to a manageable size

Configuration Sampling

Example: Configuration Interaction Testing (CIT)

IE7

Exponentially large set Manageable size set We choose to test IE7 only under sampled configurations C1, C3, and C4 and for each configurations we test IE7 with all tests {t1, t2, t3, t4, t5} 46

slide-47
SLIDE 47

vim: A configurable system

47

slide-48
SLIDE 48

vim: A configurable system

290 configurations 48

slide-49
SLIDE 49

vim: A configurable system

290 configurations sampling CIT selects 60 configurations 49

slide-50
SLIDE 50

vim: A configurable system

290 configurations sampling CIT selects 60 configurations Rerun the full test suite on each 60 configurations 50

slide-51
SLIDE 51

vim: A configurable system

290 configurations sampling CIT selects 60 configurations Rerun the full test suite on each 60 configurations 7 hours to execute the full test suite Takes 7*60 = 420 hours (~2.5 weeks) to run all test cases under each configuration 51

slide-52
SLIDE 52

vim: A configurable system

290 configurations sampling CIT selects 60 configurations Rerun the full test suite on each 60 configurations Do we have to run all tests under each configuration? 7 hours to execute the full test suite Takes 7*60 = 420 hours (~2.5 weeks) to run all test cases under each configuration 52

slide-53
SLIDE 53

Test case selection when configuration under test changes*

* Qu, Acharya, Robinson, “Impact analysis of configuration changes for test case selection”, ISSRE 2011

53

slide-54
SLIDE 54

Test case selection when configuration under test changes* IE7

* Qu, Acharya, Robinson, “Impact analysis of configuration changes for test case selection”, ISSRE 2011

54

slide-55
SLIDE 55

Test case selection when configuration under test changes*

C1 = {ON, Disabled, Yes, …} C2 = {ON, Enabled, Yes, …}

IE7

Source code DOES NOT change

IE7

Configuration under test changes

* Qu, Acharya, Robinson, “Impact analysis of configuration changes for test case selection”, ISSRE 2011

55

slide-56
SLIDE 56

Test case selection when configuration under test changes*

C1 = {ON, Disabled, Yes, …} C2 = {ON, Enabled, Yes, …}

IE7

Source code DOES NOT change

IE7

T = {t1, t2, t3, t4, t5} Configuration under test changes What test cases should I re-run for the new configuration?

* Qu, Acharya, Robinson, “Impact analysis of configuration changes for test case selection”, ISSRE 2011

56

slide-57
SLIDE 57

Test case selection when configuration under test changes*

C1 = {ON, Disabled, Yes, …} C2 = {ON, Enabled, Yes, …}

IE7

Source code DOES NOT change

IE7

T = {t1, t2, t3, t4, t5} T’ = {t2, t5} Configuration under test changes What test cases should I re-run for the new configuration?

* Qu, Acharya, Robinson, “Impact analysis of configuration changes for test case selection”, ISSRE 2011

57

slide-58
SLIDE 58

Test case selection when configuration under test changes*

C1 = {ON, Disabled, Yes, …} C2 = {ON, Enabled, Yes, …}

IE7

Source code DOES NOT change

IE7

T = {t1, t2, t3, t4, t5} T’ = {t2, t5} For the ABB system analyzed, only about 20% of the tests had to be re-run for a configuration change Configuration under test changes What test cases should I re-run for the new configuration?

* Qu, Acharya, Robinson, “Impact analysis of configuration changes for test case selection”, ISSRE 2011

58

slide-59
SLIDE 59

Product Evolution Internet Explorer IE1.0 & 2.0 IE5 IE6 IE7

59

slide-60
SLIDE 60

Configuration prioritization for regression testing*

*Qu, Cohen, Rothermel, “Configuration-aware regression testing: An empirical study of sampling and prioritization”, ISSTA 2008

60

slide-61
SLIDE 61

IE5 Configuration prioritization for regression testing*

*Qu, Cohen, Rothermel, “Configuration-aware regression testing: An empirical study of sampling and prioritization”, ISSTA 2008

{C1, C2, C3, C4, C5} T = {t1, t2, t3, t4, t5} 61

slide-62
SLIDE 62

IE7

Source code CHANGES

IE5 Configuration prioritization for regression testing*

*Qu, Cohen, Rothermel, “Configuration-aware regression testing: An empirical study of sampling and prioritization”, ISSTA 2008

{C1, C2, C3, C4, C5} T = {t1, t2, t3, t4, t5} 62

slide-63
SLIDE 63

IE7

Source code CHANGES

IE5 Configuration prioritization for regression testing*

*Qu, Cohen, Rothermel, “Configuration-aware regression testing: An empirical study of sampling and prioritization”, ISSTA 2008

{C1, C2, C3, C4, C5} {C1, C4, C3. …} Prioritization T = {t1, t2, t3, t4, t5} 63

slide-64
SLIDE 64

IE7

Source code CHANGES

IE5 Configuration prioritization for regression testing*

*Qu, Cohen, Rothermel, “Configuration-aware regression testing: An empirical study of sampling and prioritization”, ISSTA 2008

{C1, C2, C3, C4, C5} {C1, C4, C3. …} Prioritization T = {t1, t2, t3, t4, t5}

Reorder and run as many as you can

64

slide-65
SLIDE 65

IE7

Source code CHANGES

IE5 Configuration prioritization for regression testing*

*Qu, Cohen, Rothermel, “Configuration-aware regression testing: An empirical study of sampling and prioritization”, ISSTA 2008

{C1, C2, C3, C4, C5} {C1, C4, C3. …} Prioritization T = {t1, t2, t3, t4, t5} T’ = {t1, t2, t3, t4, t5} No test case selection

Reorder and run as many as you can

65

slide-66
SLIDE 66

IE7

Source code CHANGES

IE5

Increases rate of fault detection. But…

Configuration prioritization for regression testing*

*Qu, Cohen, Rothermel, “Configuration-aware regression testing: An empirical study of sampling and prioritization”, ISSTA 2008

{C1, C2, C3, C4, C5} {C1, C4, C3. …} Prioritization T = {t1, t2, t3, t4, t5} T’ = {t1, t2, t3, t4, t5} No test case selection

Reorder and run as many as you can

66

slide-67
SLIDE 67

IE7

Source code CHANGES

IE5

Increases rate of fault detection. But…

Configuration prioritization for regression testing*

*Qu, Cohen, Rothermel, “Configuration-aware regression testing: An empirical study of sampling and prioritization”, ISSTA 2008

Does not eliminate redundancy. Does not detect all faults. Not safe. {C1, C2, C3, C4, C5} {C1, C4, C3. …} Prioritization T = {t1, t2, t3, t4, t5} T’ = {t1, t2, t3, t4, t5} No test case selection

Reorder and run as many as you can

67

slide-68
SLIDE 68

IE7

Source code CHANGES

IE5

Increases rate of fault detection. But…

Configuration prioritization for regression testing*

*Qu, Cohen, Rothermel, “Configuration-aware regression testing: An empirical study of sampling and prioritization”, ISSTA 2008

Does not eliminate redundancy. Does not detect all faults. Not safe. {C1, C2, C3, C4, C5} {C1, C4, C3. …} Prioritization T = {t1, t2, t3, t4, t5} T’ = {t1, t2, t3, t4, t5} No test case selection

Can we select a subset of {C1, C2, C3, C4, C5} that is both non-redundant and safe?

Reorder and run as many as you can

68

slide-69
SLIDE 69

Configuration selection for regression testing (Focus of this talk)

69

slide-70
SLIDE 70

IE5

Configuration selection for regression testing (Focus of this talk)

{C1, C2, C3, C4, C5} T = {t1, t2, t3, t4, t5} 70

slide-71
SLIDE 71

IE7

Source code CHANGES

IE5

Configuration selection for regression testing (Focus of this talk)

{C1, C2, C3, C4, C5} T = {t1, t2, t3, t4, t5} 71

slide-72
SLIDE 72

IE7

Source code CHANGES

IE5

Configuration selection for regression testing (Focus of this talk)

{C1, C2, C3, C4, C5} {C1, C5} Selection T = {t1, t2, t3, t4, t5} 72

slide-73
SLIDE 73

IE7

Source code CHANGES

IE5

Configuration selection for regression testing (Focus of this talk)

{C1, C2, C3, C4, C5} {C1, C5} Selection T = {t1, t2, t3, t4, t5} T’ = {t1, t2, t3, t4, t5} No test case selection 73

slide-74
SLIDE 74

IE7

Source code CHANGES

IE5

Configuration selection for regression testing (Focus of this talk)

{C1, C2, C3, C4, C5} {C1, C5} Selection T = {t1, t2, t3, t4, t5} T’ = {t1, t2, t3, t4, t5} No test case selection {C1, C5} is both safe (wrt retest-all configurations) and non redundant 74

slide-75
SLIDE 75

State of the Art in Configurable System Testing

Focus of this talk 75

slide-76
SLIDE 76

State of the Art in Configurable System Testing

  • Configuration sampling
  • Single version
  • No test case selection
  • Example, CIT

Focus of this talk 76

slide-77
SLIDE 77

State of the Art in Configurable System Testing

  • Configuration sampling
  • Single version
  • No test case selection
  • Example, CIT
  • Test case selection [ISSRE ‘11]
  • Single version
  • Configuration under test changes
  • Non-redundant
  • Safe

Focus of this talk 77

slide-78
SLIDE 78

State of the Art in Configurable System Testing

  • Configuration prioritization [ISSTA ‘08]
  • Source code changes
  • Regression Testing
  • No test case selection
  • Redundant
  • Not safe
  • Configuration sampling
  • Single version
  • No test case selection
  • Example, CIT
  • Test case selection [ISSRE ‘11]
  • Single version
  • Configuration under test changes
  • Non-redundant
  • Safe

Focus of this talk 78

slide-79
SLIDE 79

State of the Art in Configurable System Testing

  • Configuration selection

[ICSM ‘12]

  • Source code changes
  • Regression testing
  • Non-redundant
  • Safe
  • No test case selection
  • Configuration prioritization [ISSTA ‘08]
  • Source code changes
  • Regression Testing
  • No test case selection
  • Redundant
  • Not safe
  • Configuration sampling
  • Single version
  • No test case selection
  • Example, CIT
  • Test case selection [ISSRE ‘11]
  • Single version
  • Configuration under test changes
  • Non-redundant
  • Safe

Focus of this talk 79

slide-80
SLIDE 80

Outline

Motivation Approach Implementation Empirical Evaluation Conclusions

80

slide-81
SLIDE 81

Key Idea: Map configuration options to code

81

slide-82
SLIDE 82

Key Idea: Map configuration options to code

Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track}

IE5

82

slide-83
SLIDE 83

Key Idea: Map configuration options to code

Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track}

IE5 IE7

change 83

slide-84
SLIDE 84

Key Idea: Map configuration options to code

Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track}

IE5 IE7

change 84

slide-85
SLIDE 85

Key Idea: Map configuration options to code

Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track} For ABB systems, configurable options (stored in a DB) maps to variables in the source code

IE5 IE7

change 85

slide-86
SLIDE 86

Key Idea: statically compute configuration option impact

Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track}

IE7

86

slide-87
SLIDE 87

Key Idea: statically compute configuration option impact

Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track}

IE7

87

slide-88
SLIDE 88

Key Idea: statically compute configuration option impact

Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track}

IE7

88

slide-89
SLIDE 89

Key Idea: statically compute configuration option impact

Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track}

IE7

89

slide-90
SLIDE 90

Key Idea: statically compute impact of the changes

Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track}

IE7

90

slide-91
SLIDE 91

Key Idea: Intersect configuration impact with change impact

Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track}

IE7

91

slide-92
SLIDE 92

Key Idea: Intersect configuration impact with change impact

Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track}

IE7

Select configuration option “Google Toolbar” for regression testing Safely discard “pop-up blocker” and “Do Not Track” 92

slide-93
SLIDE 93

Example Program

Configurable Options: {P1, P2, P3}

Mapping configurable options to source code

93

slide-94
SLIDE 94

Example Program

Configurable Options: {P1, P2, P3}

Mapping configurable options to source code

94

slide-95
SLIDE 95

Example Program

Configurable Options: {P1, P2, P3}

Mapping configurable options to source code

95

slide-96
SLIDE 96

Example Program

Configurable Options: {P1, P2, P3}

Mapping configurable options to source code

96

slide-97
SLIDE 97

Example Program

Configurable Options: {P1, P2, P3}

Mapping configurable options to source code

Function f1 changes 97

slide-98
SLIDE 98

Example

98

slide-99
SLIDE 99

Example

Options Values P1 True False P2 True False P3 True False

Configurable Options 99

slide-100
SLIDE 100

Example

Options Values P1 True False P2 True False P3 True False P1

P2

P3 C1 True True True C2 True False False C3 False True False C4 False False True

Configurable Options Configurations by pair-wise CIT 100

slide-101
SLIDE 101

Example Simplified dependency graph

Options Values P1 True False P2 True False P3 True False P1

P2

P3 C1 True True True C2 True False False C3 False True False C4 False False True

Configurable Options Configurations by pair-wise CIT 101

slide-102
SLIDE 102

Impact of configuration option P1 f1, f2, f6, f7, and f8

Options Values P1 True False P2 True False P3 True False P1

P2

P3 C1 True True True C2 True False False C3 False True False C4 False False True

Configurable Options Configurations by pair-wise CIT 102

slide-103
SLIDE 103

Impact of configuration option P2 f7 and f8

Options Values P1 True False P2 True False P3 True False P1

P2

P3 C1 True True True C2 True False False C3 False True False C4 False False True

Configurable Options Configurations by pair-wise CIT 103

slide-104
SLIDE 104

Impact of configuration option P3 f4

Options Values P1 True False P2 True False P3 True False P1

P2

P3 C1 True True True C2 True False False C3 False True False C4 False False True

Configurable Options Configurations by pair-wise CIT 104

slide-105
SLIDE 105

Impact of changed function f1

Options Values P1 True False P2 True False P3 True False P1

P2

P3 C1 True True True C2 True False False C3 False True False C4 False False True

Configurable Options Configurations by pair-wise CIT

f1, f2, and f6

105

slide-106
SLIDE 106

Select option P1 and safely discard P2 and P3

Options Values P1 True False P2 True False P3 True False P1

P2

P3 C1 True True True C2 True False False C3 False True False C4 False False True

Configurable Options Configurations by pair-wise CIT 106

slide-107
SLIDE 107

Select option P1 and safely discard P2 and P3

Options Values P1 True False P2 True False P3 True False

Configurable Options

P1

P2

P3 C1 True True True C2 True False False C3 False True False C4 False False True

Configurations by pair-wise CIT 107

slide-108
SLIDE 108

Outline

Motivation

Configuration Selection Approach

Implementation Empirical Evaluation

Conclusions

108

slide-109
SLIDE 109

Research Questions

Effectiveness

1

How does our selection compare to retest-all, in terms

  • f fault detection?

2

What percentage

  • f configurations

is discarded as redundant by our selection?

Efficiency

3

How much regression time can our selection save?

109

slide-110
SLIDE 110

Research Questions

Effectiveness

1

How does our selection compare to retest-all, in terms

  • f fault detection?

2

What percentage

  • f configurations

is discarded as redundant by our selection?

Efficiency

3

How much regression time can our selection save?

110

slide-111
SLIDE 111

Subjects

  • Make (Software Infrastructure Repository)
  • V3.77 to v3.78.1
  • LOC: ≈ 15k LOC
  • Code changes: selects 60 from 869
  • Seeded 15 faults
  • Configurable options: 11 (binary)  7 configurations
  • Grep
  • V1.0 to V2.0
  • LOC: ≈ 8k LOC
  • Code changes: 15
  • Seeded 15 faults
  • Configurable options: 14 (binary)  7 configurations

111

slide-112
SLIDE 112

Results

Make Grep Retest-all 8/15 6/15 Our selection 8/15 6/15 Random selection 3/15 5/15

Fault Detection Ability

112

slide-113
SLIDE 113

Results

Make Grep Retest-all 8/15 6/15 Our selection 8/15 6/15 Random selection 3/15 5/15

Fault Detection Ability

Our approach is safe wrt retest-all configurations 113

slide-114
SLIDE 114

Research Questions

Effectiveness

1

How does our selection compare to retest-all, in terms

  • f fault detection?

2

What percentage

  • f configurations

is discarded as redundant by our selection?

Efficiency

3

How much regression time can our selection save?

114

slide-115
SLIDE 115

Subject

  • LOC: 1.18 MLOC
  • Number of Functions: 20,432 functions
  • Code changes: 203
  • Configurable options: 545 (number of values range from 2 to 9)  159

configurations

  • Among the 203 changes, we selected three sets of 30 changes for analysis

ABB1

115

slide-116
SLIDE 116

Results Percentage of configurations selected

NUMBER OF CONFIGURABLE OPTIONS SELECTED NUMBER OF CONFIGURATIONS SELECTED Change set 1 Change set 2 Change set 3 Average Retest-all 545 Selected 167 161 161 163 reduction 69% 70% 70% 70% Change set 1 Change set 2 Change set 3 Average Retest-all 159 Selected 120 120 120 120 reduction 25% 25% 25% 25% 116

slide-117
SLIDE 117

Research Questions

Effectiveness

1

How does our selection compare to retest-all, in terms

  • f fault detection?

2

What percentage

  • f configurations

is discarded as redundant by our selection?

Efficiency

3

How much regression time can our selection save?

117

slide-118
SLIDE 118

Results Testing time savings

grep make ABB1 Testing time Retest-all 70m 700m 795h Our approach 60m 300m 600h Overhead

  • f selection

5.2m 13m 28h Time savings 5m 387m 167h 50% 55% 21% 118

slide-119
SLIDE 119

Results Testing time savings

grep make ABB1 Testing time Retest-all 70m 700m 795h Our approach 60m 300m 600h Overhead

  • f selection

5.2m 13m 28h Time savings 5m 387m 167h 50% 55% 21% Our configuration selection approach saves about 20-55% of testing time wrt retest-all configurations 119

slide-120
SLIDE 120

Better than random, safe wrt retest-all

safe

Effectiveness

1

How does our selection compare to retest-all and random in terms

  • f fault detection?

15 – 60%

2

What percentage

  • f configurations

is discarded as redundant by our selection?

Efficiency

20 – 55%

3

How much regression time can our selection save?

120

slide-121
SLIDE 121

Outline

Motivation

Configuration Selection Approach

Implementation Empirical Evaluation

Conclusions

121

slide-122
SLIDE 122

First configuration selection approach for regression testing

122

slide-123
SLIDE 123

IE7

Source code CHANGES

IE5

First configuration selection approach for regression testing

123

slide-124
SLIDE 124

IE7

Source code CHANGES

IE5

First configuration selection approach for regression testing

{C1, C2, C3, C4, C5} {C1, C5} Selection 124

slide-125
SLIDE 125

IE7

Source code CHANGES

IE5

First configuration selection approach for regression testing

{C1, C2, C3, C4, C5} {C1, C5} Selection T = {t1, t2, t3, t4, t5} T’ = {t1, t2, t3, t4, t5} No test case selection 125

slide-126
SLIDE 126

IE7

Source code CHANGES

IE5

First configuration selection approach for regression testing

{C1, C2, C3, C4, C5} {C1, C5} Selection T = {t1, t2, t3, t4, t5} T’ = {t1, t2, t3, t4, t5} No test case selection {C1, C5} is both safe (wrt retest-all configurations) and non redundant 126

slide-127
SLIDE 127

IE7

Source code CHANGES

IE5

First configuration selection approach for regression testing

{C1, C2, C3, C4, C5} {C1, C5} Selection T = {t1, t2, t3, t4, t5} T’ = {t1, t2, t3, t4, t5} No test case selection {C1, C5} is both safe (wrt retest-all configurations) and non redundant In our experiments, 15-60% of configurations were discarded as redundant saving 20-55% of regression testing time 127

slide-128
SLIDE 128

128