Adaptive Random Test Case Prioritization Speaker: Bo Jiang Co-authors: Zhenyu Zhang, W.K. Chant, T.H. Tse The University of Hong Kong cIty University of Hong Kong 香港城市大學 Bs COMPUTER SCIENCE City University of Hong Kong s THE UNIVERSITY OF HONG KONG
Adaptive Random Test Case Prioritization Speaker: Bo Jiang* Co-authors: Zhenyu Zhang* , W.K.Chan† , T.H.Tse* *The University of Hong Kong †City University of Hong Kong 1
Contents Background Motivation Adaptive Random Test case prioritization )Experiments and results analysis Related Works Conclusion Future work
Contents 2 Background Motivation Adaptive Random Test Case Prioritization Experiments and Results Analysis Related Works Conclusion & Future work
Regression Testing Techniques Obsolete Test case elimination Test Suite Program Test Suite T Accounts for 50% of the cost of software maintenance Test Suite T Test Suite Test Suite Program T T st St P
Regression Testing Techniques 3 Program P Program P’ Test Suite T Test Suite T’ Test Suite T’ Test Suite T’ Test Suite T’ Test Suite T Obsolete Test Case Elimination Test Case Augmentation Test Case Prioritization Test Case Reduction Test Case Selection Accounts for 50% of the cost of software maintenance
Test case prioritization Definition Test case prioritization permutes a test suite Tfor execution to meet a chosen testing goal Typical testing goals Rate of code coverage Rate of fault detection Rate of requirement coverage Merits No impact on the fault detection ability
Test Case Prioritization 4 Definition Test case prioritization permutes a test suite T for execution to meet a chosen testing goal. Typical testing goals Rate of code coverage Rate of fault detection Rate of requirement coverage Merits No impact on the fault detection ability
Coverage-based Test Case Prioritization Technique Total-statement/function/branch Highest code coverage first Resolve tie-case randomly Additional-statement/function/branch Additional highest code coverage first Reset when no more coverage can be achieved Resolve tie-case randomly Disadvantages Hard to scale to larger programs
Coverage-based Test Case Prioritization Technique 5 Total-statement/function/branch Highest code coverage first Resolve tie-case randomly Additional-statement/function/branch Additional highest code coverage first Reset when no more coverage can be achieved Resolve tie-case randomly Disadvantages Hard to scale to larger programs
Contents Background Motivation Adaptive Random Test case prioritization )Experiments and results analysis Related Works Conclusion Future work
Contents 6 Background Motivation Adaptive Random Test Case Prioritization Experiments and Results Analysis Related Works Conclusion & Future work
Problem With Total Techniques GREP FLEX 1100 80 Elbaum et al.@ TSE 2002
Problem With Total Techniques 7 GREP FLEX Elbaum et al. @ TSE 2002 APFD
Problem With Total(greedy) Techniques GREP FLEX 1100 0800 Total strategy may NOT be effective for real-life program Elbaum et al.@ TSE 2002
Problem With Total(greedy) Techniques 8 GREP FLEX Total strategy may NOT be effective for real-life program Elbaum et al. @ TSE 2002 APFD
Problems with Additional Techniques Random Random Additional Additional Tota Total Siemens Sie me ns Unix Siemens Unix
Problems with Additional Techniques 9 1 2 3 4 5 6 0 5 10 15 20 25 30 35 40 45 Time Used for Prioritization Random Siemens Random Unix Additional Siemens Additional Unix Total Siemens Total Unix
Problems with Additional Techniques Additional Techniques may not be efficient for real-life programs Random Random Additional Additional Tota Total Siemens Sie me ns Unix Siemens Unix 10
Problems with Additional Techniques 10 1 2 3 4 5 6 0 5 10 15 20 25 30 35 40 45 Time Used for Prioritization Random Siemens Random Unix Additional Siemens Additional Unix Total Siemens Total Unix Additional Techniques may NOT be efficient for real-life programs