code change impact analysis for testing configurable
play

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,


  1. Configuration Sampling Reducing the exponential number of configurations to a manageable size 41

  2. Configuration Sampling Reducing the exponential number of configurations to a manageable size IE7 {C 1 , C 2 , C 3 , C 4 , C 5 , …} Exponentially large set T = {t 1 , t 2 , t 3 , t 4 , t 5 } 42

  3. Configuration Sampling Reducing the exponential number of configurations to a manageable size IE7 IE7 {C 1 , C 3 , C 4 } Sampling {C 1 , C 2 , C 3 , C 4 , C 5 , …} Manageable size set Exponentially large set T = {t 1 , t 2 , t 3 , t 4 , t 5 } 43

  4. Configuration Sampling Reducing the exponential number of configurations to a manageable size IE7 IE7 {C 1 , C 3 , C 4 } Sampling {C 1 , C 2 , C 3 , C 4 , C 5 , …} Manageable size set Exponentially large set T = {t 1 , t 2 , t 3 , t 4 , t 5 } No test case selection T’ = {t 1 , t 2 , t 3 , t 4 , t 5 } 44

  5. Configuration Sampling Reducing the exponential number of configurations to a manageable size IE7 IE7 {C 1 , C 3 , C 4 } Sampling {C 1 , C 2 , C 3 , C 4 , C 5 , …} Manageable size set Exponentially large set T = {t 1 , t 2 , t 3 , t 4 , t 5 } No test case selection T’ = {t 1 , t 2 , t 3 , t 4 , t 5 } Example: Configuration Interaction Testing (CIT) 45

  6. Configuration Sampling Reducing the exponential number of configurations to a manageable size IE7 IE7 {C 1 , C 3 , C 4 } Sampling {C 1 , C 2 , C 3 , C 4 , C 5 , …} Manageable size set Exponentially large set T = {t 1 , t 2 , t 3 , t 4 , t 5 } No test case selection T’ = {t 1 , t 2 , t 3 , t 4 , t 5 } Example: Configuration Interaction Testing (CIT) We choose to test IE7 only under sampled configurations C 1 , C 3 , and C 4 and for each configurations we test IE7 with all tests {t 1 , t 2 , t 3 , t 4 , t 5 } 46

  7. vim : A configurable system 47

  8. vim : A configurable system 2 90 configurations 48

  9. vim : A configurable system CIT selects 2 90 configurations sampling 60 configurations 49

  10. vim : A configurable system CIT selects 2 90 configurations sampling 60 configurations Rerun the full test suite on each 60 configurations 50

  11. vim : A configurable system CIT selects 2 90 configurations sampling 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

  12. vim : A configurable system CIT selects 2 90 configurations sampling 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 Do we have to run all tests under each configuration? 52

  13. Test case selection when configuration under test changes* * Qu, Acharya, Robinson, “Impact analysis of configuration changes for test case selection”, ISSRE 2011 53

  14. Test case selection when configuration under test changes* IE7 * Qu, Acharya, Robinson, “Impact analysis of configuration changes for test case selection”, ISSRE 2011 54

  15. Test case selection when configuration under test changes* Source code DOES NOT change IE7 IE7 Configuration under test changes C 1 = {ON, Disabled, Yes, …} C 2 = {ON, Enabled, Yes, …} * Qu, Acharya, Robinson, “Impact analysis of configuration changes for test case selection”, ISSRE 2011 55

  16. Test case selection when configuration under test changes* Source code DOES NOT change IE7 IE7 Configuration under test changes C 1 = {ON, Disabled, Yes, …} C 2 = {ON, Enabled, Yes, …} What test cases should I re-run for the new configuration? T = {t 1 , t 2 , t 3 , t 4 , t 5 } * Qu, Acharya, Robinson, “Impact analysis of configuration changes for test case selection”, ISSRE 2011 56

  17. Test case selection when configuration under test changes* Source code DOES NOT change IE7 IE7 Configuration under test changes C 1 = {ON, Disabled, Yes, …} C 2 = {ON, Enabled, Yes, …} What test cases should I re-run for the new configuration? T = {t 1 , t 2 , t 3 , t 4 , t 5 } T’ = {t 2 , t 5 } * Qu, Acharya, Robinson, “Impact analysis of configuration changes for test case selection”, ISSRE 2011 57

  18. Test case selection when configuration under test changes* Source code DOES NOT change IE7 IE7 Configuration under test changes C 1 = {ON, Disabled, Yes, …} C 2 = {ON, Enabled, Yes, …} What test cases should I re-run for the new configuration? T = {t 1 , t 2 , t 3 , t 4 , t 5 } T’ = {t 2 , t 5 } For the ABB system analyzed, only about 20% of the tests had to be re-run for a configuration change * Qu, Acharya, Robinson, “Impact analysis of configuration changes for test case selection”, ISSRE 2011 58

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

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

  21. Configuration prioritization for regression testing* IE5 {C 1 , C 2 , C 3 , C 4 , C 5 } T = {t 1 , t 2 , t 3 , t 4 , t 5 } *Qu, Cohen, Rothermel, “Configuration-aware regression testing: An empirical study of sampling and prioritization”, ISSTA 2008 61

  22. Configuration prioritization for regression testing* Source code CHANGES IE5 IE7 {C 1 , C 2 , C 3 , C 4 , C 5 } T = {t 1 , t 2 , t 3 , t 4 , t 5 } *Qu, Cohen, Rothermel, “Configuration-aware regression testing: An empirical study of sampling and prioritization”, ISSTA 2008 62

  23. Configuration prioritization for regression testing* Source code CHANGES IE5 IE7 {C 1 , C 4 , C 3. … } Prioritization {C 1 , C 2 , C 3 , C 4 , C 5 } T = {t 1 , t 2 , t 3 , t 4 , t 5 } *Qu, Cohen, Rothermel, “Configuration-aware regression testing: An empirical study of sampling and prioritization”, ISSTA 2008 63

  24. Configuration prioritization for regression testing* Source code CHANGES IE5 IE7 {C 1 , C 4 , C 3. … } Prioritization {C 1 , C 2 , C 3 , C 4 , C 5 } Reorder and run as many as you can T = {t 1 , t 2 , t 3 , t 4 , t 5 } *Qu, Cohen, Rothermel, “Configuration-aware regression testing: An empirical study of sampling and prioritization”, ISSTA 2008 64

  25. Configuration prioritization for regression testing* Source code CHANGES IE5 IE7 {C 1 , C 4 , C 3. … } Prioritization {C 1 , C 2 , C 3 , C 4 , C 5 } Reorder and run as many as you can T = {t 1 , t 2 , t 3 , t 4 , t 5 } No test case selection T’ = {t 1 , t 2 , t 3 , t 4 , t 5 } *Qu, Cohen, Rothermel, “Configuration-aware regression testing: An empirical study of sampling and prioritization”, ISSTA 2008 65

  26. Configuration prioritization for regression testing* Source code CHANGES IE5 IE7 {C 1 , C 4 , C 3. … } Prioritization {C 1 , C 2 , C 3 , C 4 , C 5 } Reorder and run as many as you can T = {t 1 , t 2 , t 3 , t 4 , t 5 } No test case selection T’ = {t 1 , t 2 , t 3 , t 4 , t 5 } Increases rate of fault detection. But… *Qu, Cohen, Rothermel, “Configuration-aware regression testing: An empirical study of sampling and prioritization”, ISSTA 2008 66

  27. Configuration prioritization for regression testing* Source code CHANGES IE5 IE7 {C 1 , C 4 , C 3. … } Prioritization {C 1 , C 2 , C 3 , C 4 , C 5 } Reorder and run as many as you can T = {t 1 , t 2 , t 3 , t 4 , t 5 } No test case selection T’ = {t 1 , t 2 , t 3 , t 4 , t 5 } Increases rate of fault detection. But… Does not eliminate redundancy. Does not detect all faults. Not safe. *Qu, Cohen, Rothermel, “Configuration-aware regression testing: An empirical study of sampling and prioritization”, ISSTA 2008 67

  28. Configuration prioritization for regression testing* Source code CHANGES IE5 IE7 {C 1 , C 4 , C 3. … } Prioritization {C 1 , C 2 , C 3 , C 4 , C 5 } Reorder and run as many as you can T = {t 1 , t 2 , t 3 , t 4 , t 5 } No test case selection T’ = {t 1 , t 2 , t 3 , t 4 , t 5 } Increases rate of fault detection. But… Does not eliminate redundancy. Does not detect all faults. Not safe. Can we select a subset of {C 1 , C 2 , C 3 , C 4 , C 5 } that is both non-redundant and safe? *Qu, Cohen, Rothermel, “Configuration-aware regression testing: An empirical study of sampling and prioritization”, ISSTA 2008 68

  29. Configuration selection for regression testing (Focus of this talk) 69

  30. Configuration selection for regression testing (Focus of this talk) IE5 {C 1 , C 2 , C 3 , C 4 , C 5 } T = {t 1 , t 2 , t 3 , t 4 , t 5 } 70

  31. Configuration selection for regression testing (Focus of this talk) Source code CHANGES IE5 IE7 {C 1 , C 2 , C 3 , C 4 , C 5 } T = {t 1 , t 2 , t 3 , t 4 , t 5 } 71

  32. Configuration selection for regression testing (Focus of this talk) Source code CHANGES IE5 IE7 {C 1 , C 5 } Selection {C 1 , C 2 , C 3 , C 4 , C 5 } T = {t 1 , t 2 , t 3 , t 4 , t 5 } 72

  33. Configuration selection for regression testing (Focus of this talk) Source code CHANGES IE5 IE7 {C 1 , C 5 } Selection {C 1 , C 2 , C 3 , C 4 , C 5 } T = {t 1 , t 2 , t 3 , t 4 , t 5 } T’ = {t 1 , t 2 , t 3 , t 4 , t 5 } No test case selection 73

  34. Configuration selection for regression testing (Focus of this talk) Source code CHANGES IE5 IE7 {C 1 , C 5 } Selection {C 1 , C 2 , C 3 , C 4 , C 5 } T = {t 1 , t 2 , t 3 , t 4 , t 5 } T’ = {t 1 , t 2 , t 3 , t 4 , t 5 } No test case selection {C 1 , C 5 } is both safe (wrt retest-all configurations) and non redundant 74

  35. State of the Art in Configurable System Testing Focus of this talk 75

  36. State of the Art in Configurable System Testing  Configuration sampling  Single version  No test case selection  Example, CIT Focus of this talk 76

  37. State of the Art in Configurable System Testing  Configuration sampling  Single version  No test case selection  Example, CIT Focus of this talk  Test case selection [ISSRE ‘11]  Single version  Configuration under test changes  Non-redundant  Safe 77

  38. State of the Art in Configurable System Testing  Configuration sampling  Single version  No test case selection  Example, CIT Focus of this talk  Configuration prioritization [ISSTA ‘08]  Test case selection [ISSRE ‘11]  Source code changes  Single version  Regression Testing  Configuration under test changes  No test case selection  Non-redundant  Redundant  Safe 78  Not safe

  39. State of the Art in Configurable System Testing  Configuration sampling  Single version  No test case selection  Example, CIT  Configuration selection [ICSM ‘12]  Source code changes Focus of  Regression testing this talk  Non-redundant  Safe  No test case selection  Configuration prioritization [ISSTA ‘08]  Test case selection [ISSRE ‘11]  Source code changes  Single version  Regression Testing  Configuration under test changes  No test case selection  Non-redundant  Redundant  Safe 79  Not safe

  40. Empirical Evaluation Implementation Conclusions Approach Motivation Outline 80

  41. Key Idea: Map configuration options to code 81

  42. Key Idea: Map configuration options to code Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track} IE5 82

  43. Key Idea: Map configuration options to code Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track} IE7 IE5 change 83

  44. Key Idea: Map configuration options to code Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track} IE7 IE5 change 84

  45. Key Idea: Map configuration options to code Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track} IE7 IE5 change For ABB systems, configurable options (stored in a DB) maps to variables in the source code 85

  46. Key Idea: statically compute configuration option impact Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track} IE7 86

  47. Key Idea: statically compute configuration option impact Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track} IE7 87

  48. Key Idea: statically compute configuration option impact Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track} IE7 88

  49. Key Idea: statically compute configuration option impact Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track} IE7 89

  50. Key Idea: statically compute impact of the changes Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track} IE7 90

  51. Key Idea: Intersect configuration impact with change impact Configuration options: {pop-up-blocker, Google Toolbar, Do Not Track} IE7 91

  52. 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

  53. Example Program Mapping configurable options to source code Configurable Options: {P 1 , P 2 , P 3 } 93

  54. Example Program Mapping configurable options to source code Configurable Options: {P 1 , P 2 , P 3 } 94

  55. Example Program Mapping configurable options to source code Configurable Options: {P 1 , P 2 , P 3 } 95

  56. Example Program Mapping configurable options to source code Configurable Options: {P 1 , P 2 , P 3 } 96

  57. Example Program Mapping configurable options to source code Configurable Options: {P 1 , P 2 , P 3 } Function f 1 changes 97

  58. Example 98

  59. False False False Configurable Options Values True True True Options P 1 P 2 P 3 Example 99

  60. Example Configurable Options Options Values P 1 True False P 2 True False P 3 True False Configurations by pair-wise CIT P 2 P 1 P 3 C 1 True True True C 2 True False False C 3 False True False C 4 False False True 100

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend