SLIDE 1 Code Change Impact Analysis for Testing Configurable Software Systems
Mithun Acharya ABB Corporate Research Raleigh NC USA
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
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 Software in ABB
4
Hardware with software inside Software with few hardware components Pure Software
SLIDE 5 5
Software Evolution: A CSS constantly changes
Hundreds of such changes committed daily
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 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 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 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
Making impact analysis practical and useful
10
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 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 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 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 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
Outline
Motivation Approach Implementation Empirical Evaluation Conclusions
16
SLIDE 17 Configurable Software Systems
- Software that can be customized through a set of options
- Example: Internet Explorer
17
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
Internet Explorer Configurations
C1 C2 … Pop Up Blocker ON ON … Google Toolbar Disabled Enabled … Do Not Track Yes Yes … … … … … 19
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
Internet Explorer Configurations
C1 C2 … Pop Up Blocker ON ON … Google Toolbar Disabled Enabled … Do Not Track Yes Yes … … … … … Option Value 21
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
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
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
Impact of Configuration on System Behavior
To fix this, open IE7, click “Tools > Manage Add-ons > Disable Google Toolbar”
25
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
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
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
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
Configurations control system execution IE7 IE7
30
SLIDE 31
Configurations control system execution
C1 = {ON, disabled, Yes, …}
IE7 IE7
31
SLIDE 32
Configurations control system execution
Test: PASS C1 = {ON, disabled, Yes, …}
IE7 IE7
32
SLIDE 33
Configurations control system execution
Test: PASS C2 = {ON, enabled, Yes, …} C1 = {ON, disabled, Yes, …}
IE7 IE7
33
SLIDE 34
Configurations control system execution
Test: FAIL Test: PASS C2 = {ON, enabled, Yes, …} C1 = {ON, disabled, Yes, …}
IE7 IE7
34
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
Challenges for testing configurable systems
36
SLIDE 37
Challenges for testing configurable systems
n options 2n configurations 37
SLIDE 38
Challenges for testing configurable systems
n options 2n configurations
IE7 IE5
Product evolves 38
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
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
Reducing the exponential number of configurations to a manageable size
Configuration Sampling
41
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
{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
{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
{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
{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
vim: A configurable system
47
SLIDE 48
vim: A configurable system
290 configurations 48
SLIDE 49
vim: A configurable system
290 configurations sampling CIT selects 60 configurations 49
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
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
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 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 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 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 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 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 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
Product Evolution Internet Explorer IE1.0 & 2.0 IE5 IE6 IE7
59
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 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 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 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 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 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 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 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 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
Configuration selection for regression testing (Focus of this talk)
69
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
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
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
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
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
State of the Art in Configurable System Testing
Focus of this talk 75
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 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 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 State of the Art in Configurable System Testing
[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
Outline
Motivation Approach Implementation Empirical Evaluation Conclusions
80
SLIDE 81
Key Idea: Map configuration options to code
81
SLIDE 82
Key Idea: Map configuration options to code
Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track}
IE5
82
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
Key Idea: Map configuration options to code
Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track}
IE5 IE7
change 84
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
Key Idea: statically compute configuration option impact
Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track}
IE7
86
SLIDE 87
Key Idea: statically compute configuration option impact
Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track}
IE7
87
SLIDE 88
Key Idea: statically compute configuration option impact
Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track}
IE7
88
SLIDE 89
Key Idea: statically compute configuration option impact
Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track}
IE7
89
SLIDE 90
Key Idea: statically compute impact of the changes
Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track}
IE7
90
SLIDE 91
Key Idea: Intersect configuration impact with change impact
Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track}
IE7
91
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
Example Program
Configurable Options: {P1, P2, P3}
Mapping configurable options to source code
93
SLIDE 94
Example Program
Configurable Options: {P1, P2, P3}
Mapping configurable options to source code
94
SLIDE 95
Example Program
Configurable Options: {P1, P2, P3}
Mapping configurable options to source code
95
SLIDE 96
Example Program
Configurable Options: {P1, P2, P3}
Mapping configurable options to source code
96
SLIDE 97
Example Program
Configurable Options: {P1, P2, P3}
Mapping configurable options to source code
Function f1 changes 97
SLIDE 98
Example
98
SLIDE 99 Example
Options Values P1 True False P2 True False P3 True False
Configurable Options 99
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 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 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 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 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 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 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 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
Outline
Motivation
Configuration Selection Approach
Implementation Empirical Evaluation
Conclusions
108
SLIDE 109 Research Questions
Effectiveness
1
How does our selection compare to retest-all, in terms
2
What percentage
is discarded as redundant by our selection?
Efficiency
3
How much regression time can our selection save?
109
SLIDE 110 Research Questions
Effectiveness
1
How does our selection compare to retest-all, in terms
2
What percentage
is discarded as redundant by our selection?
Efficiency
3
How much regression time can our selection save?
110
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
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
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 Research Questions
Effectiveness
1
How does our selection compare to retest-all, in terms
2
What percentage
is discarded as redundant by our selection?
Efficiency
3
How much regression time can our selection save?
114
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
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 Research Questions
Effectiveness
1
How does our selection compare to retest-all, in terms
2
What percentage
is discarded as redundant by our selection?
Efficiency
3
How much regression time can our selection save?
117
SLIDE 118 Results Testing time savings
grep make ABB1 Testing time Retest-all 70m 700m 795h Our approach 60m 300m 600h Overhead
5.2m 13m 28h Time savings 5m 387m 167h 50% 55% 21% 118
SLIDE 119 Results Testing time savings
grep make ABB1 Testing time Retest-all 70m 700m 795h Our approach 60m 300m 600h Overhead
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 Better than random, safe wrt retest-all
safe
Effectiveness
1
How does our selection compare to retest-all and random in terms
15 – 60%
2
What percentage
is discarded as redundant by our selection?
Efficiency
20 – 55%
3
How much regression time can our selection save?
120
SLIDE 121
Outline
Motivation
Configuration Selection Approach
Implementation Empirical Evaluation
Conclusions
121
SLIDE 122
First configuration selection approach for regression testing
122
SLIDE 123
IE7
Source code CHANGES
IE5
First configuration selection approach for regression testing
123
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
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
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
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
128