






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Professor: Memon; Class: ADV TOPC PROG LANG; Subject: Computer Science; University: University of Maryland; Term: Fall 2002;
Typology: Study notes
1 / 10
This page cannot be seen from the preview
Don't miss anything!







? Run the right test at the right time ? Focusing testing efforts on parts of the program affected by change. ? New defects probably result of new modifications
? Technique must be fast, useful, and easily integrated into the development process. ? Estimate program change based on comparisons of binary representations of code.
Binary Change Analysis
Coverage Analysis
Test Prioritization
Old Binary Coverage
Prioritized List of Test Cases
List of Blocks not Covered by Testing
Old Binary
New Binary
Prioritizing Tests
?Prioritizes tests into an ordered
sequence based on program change.
Calculating Program Change
? The paper points out other works in test selection [1][3][4][20][28] and test prioritization [6][8][17][31] that also use program change as a guiding factor.
? Cites how differences in techniques affect the estimation of program change.
Calculating Program Change
?Source code differencing
?Data and control flow analysis
?Coarse-grained code entities
Calculating Program Change
? Simple and fast
? Can be accomplished with commonly available tools like “diff” in Unix
? Erroneously marks a procedure as changed even if variables were only renamed.
? Fails to determine the set of affected procedures when header files that define macros and methods have been modified.
Calculating Program Change
? Uses functions, global variables, type definitions, etc. to identify which parts of the program might be affected by the changes.
? According to [11], estimations of program change based on coarse-grained entities [5] may select more tests than statement or control flow based techniques.
Calculating Program Change
? Difficult in a language such as C++/C which contains pointers, casts, and aliasing.
? Flow analysis is expensive in large commercial systems [9][21] and should not be used unless the techniques will be helpful for other analyses[9].
Step 2: Coverage Analysis
Binary Change Analysis
Coverage Analysis
Test Prioritization
Old Binary Coverage
Prioritized List of Test Cases
List of Blocks not Covered by Testing
Old Binary
New Binary
Step 2: Coverage Analysis
? Old modified blocks ? Check to see if the test covered the matching block in the old binary using the cover information of the old binary.
? New blocks ? A test may cover a new block if it covers at least one of its immediate predecessor blocks and at least one of its immediate successor blocks, skipping in both cases, any intermediate new blocks.
Step 2: Coverage Analysis
Predecessor Blocks (P)
Successor Blocks (S)
New Block (N)
Interprocedural edge
Step 3: Test Prioritization
Binary Change Analysis
Coverage Analysis
Test Prioritization
Old Binary Coverage
Prioritized List of Test Cases
List of Blocks not Covered by Testing
Old Binary
New Binary
Step 3: Test Prioritization
Weights
Step 3: Test Prioritization
Impacted Blocks
Prioritized List
Step 3: Test Prioritization
Weights
Impacted Blocks
Prioritized List
T T
Step 3: Test Prioritization
Weights
Impacted Blocks
Prioritized List
T T
Step 3: Test Prioritization
Weights
Impacted Blocks
Prioritized List
T
Step 3: Test Prioritization
Weights
Impacted Blocks
Prioritized List
T T
Step 3: Test Prioritization
Weights
Impacted Blocks
Prioritized List
T T
T
Step 3: Test Prioritization
Weights
Impacted Blocks
Prioritized List
T T
Step 3: Test Prioritization
Weights
Impacted Blocks
Prioritized List
T T
T T T
Sequence #
Sequence #
Empirical Evaluation
?Performance
?Effectiveness
Performance of Echelon
No. of Tests 3128 3128
File Size (bytes) 8,880,128 8,880,
Blocks 668,068 668,
Functions 31,020 31,
Date December 2000 January 2001
Version 1 Version
Performance of Echelon
sequences
Echelon
Covered
Total
Old
New 220
378
158
Impacted Blocks
Performance Analysis
?How many sequences of tests were
formed?
?How many tests are in each sequence?
?How accurate is Echelon?
Performance Analysis Number of Tests in Each Sequence
First Sequence: 16 tests
Cover a common routine
Performance of Echelon
sequences
Echelon
Covered
Total
Old
New 220
378
158
Impacted Blocks
Performance Analysis Number of Impacted Blocks in Each Sequence
Maximum number of covered blocks
Performance Analysis
?Accuracy
Performance Analysis Incorrectly Predicted False Positives
Performance Analysis
Successor Blocks (S)
New Block (N)
False positives can be explained by instances where there was also a direct path from the predecessor to the successor of a new block.
Performance Analysis Incorrectly Predicted False Negatives
[13] M. J. Harrold, R. Gupta and M. L. Soffa , "A Methodology for Controlling the Size of a Test Suite", ACM Trans. Software Eng. And Methodology, vol. 2, no. 3, pp. 270-285, July 1993.
[17] G. Rothermel , R. H. Untch and M. J. Harrold, "Prioritizing Test Cases For Regression Testing", IEEE trans. On Software Engineering, vol. 27, no. 10, Oct. 2001
[19] G. Rothermel , M. J. Harrold, J. Ostrin and C. Hong, "An Empirical Study of the Effects of Minimization on the Fault Detection Capabilities of Test Suites", Proc. Int'l Conf. Software Maintenance, pp. 34-43, Nov. 1998.
[20] G. Rothermel and M. J. Harrold, "A Safe, Efficient Regression Test Selection Technique", ACM Trans. Software Eng. And Methodology, vol. 6, no. 2, pp. 173-210, Apr. 1997.
[28] F. Vokolos and P. Frankl , "Pythia : a regression test selection tool based on text differencing", Int'l conference on reliability, Quality and Safety of SoftwareIntensive Systems, May 1997.
[30] W. E. Wong, J. R. Horgan , S. London, and A. P. Mathur, "Effect of Test Set Minimization on Fault Detection Effectiveness", Software-Practice and Experience, vol. 28. no. 4, pp. 347-369, Apr. 1998.
[31] W. E. Wong, J. R. Horgan , S. London, and H. Agrawal , "A Study of Effective Regression Testing in Practice", Proc. Eighth Int'l Symposium Software Reliability Eng., pp. 230-238, Nov. 1997.