Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/3180155.3180254acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

Towards refactoring-aware regression test selection

Published: 27 May 2018 Publication History

Abstract

Regression testing checks that recent project changes do not break previously working functionality. Although important, regression testing is costly when changes are frequent. Regression test selection (RTS) optimizes regression testing by running only tests whose results might be affected by a change. Traditionally, RTS collects dependencies (e.g., on files) for each test and skips the tests, at a new project revision, whose dependencies did not change. Existing RTS techniques do not differentiate behavior-preserving transformations (i.e., refactorings) from other code changes. As a result, tests are run more frequently than necessary.
We present the first step towards a refactoring-aware RTS technique, dubbed Reks, which skips tests affected only by behavior-preserving changes. Reks defines rules to update the test dependencies without running the tests. To ensure that Reks does not hide any bug introduced by the refactoring engines, we integrate Reks only in the pre-submit testing phase, which happens on the developers' machines. We evaluate Reks by measuring the savings in the testing effort. Specifically, we reproduce 100 refactoring tasks performed by developers of 37 projects on GitHub. Our results show that Reks would not run, on average, 33% of available tests (that would be run by a refactoring-unaware RTS technique). Additionally, we systematically run 27 refactoring types on ten projects. The results, based on 74,160 refactoring tasks, show that Reks would not run, on average, 16% of tests (max: 97% and SD: 24%). Finally, our results show that the Reks update rules are efficient.

References

[1]
Everton L. G. Alves, Patricia D. L. Machado, Tiago Massoni, and Miryung Kim. 2016. Prioritizing Test Cases for Early Detection of Refactoring Faults. Software Testing, Verification and Reliability (2016), 402--426.
[2]
Everton L. G. Alves, Myoungkyu Song, and Miryung Kim. 2014. RefDistiller: A Refactoring Aware Code Review Tool for Inspecting Manual Refactoring Edits. In International Symposium on Foundations of Software Engineering. 751--754.
[3]
Apache Camel - Building 2017. Building Apache Camel. (2017). http://camel.apache.org/building.html.
[4]
Emilie Balland, Paul Brauner, Radu Kopetz, Pierre-Etienne Moreau, and Antoine Reilles. 2007. Tom: Piggybacking Rewriting on Java. In Rewriting Techniques and Applications. 36--47.
[5]
Ira D. Baxter, Christopher Pidgeon, and Michael Mehlich. 2004. DMS: Program Transformations for Practical Scalable Software Evolution. In International Conference on Software Engineering. 625--634.
[6]
Swarnendu Biswas, Rajib Mall, Manoranjan Satpathy, and Srihari Sukumaran. 2011. Regression Test Selection Techniques: A Survey. Informatica (Slovenia) 35, 3 (2011), 289--321.
[7]
Paulo Borba, Augusto Sampaio, Ana Cavalcanti, and Márcio Cornélio. 2004. Algebraic Reasoning for Object-oriented Programming. Sci. Comput. Program. 52, 1--3 (2004), 53--100.
[8]
Marat Boshernitsan and Susan L. Graham. 2004. iXj: Interactive Source-to-Source Transformations for Java. In Conference on Object-Oriented Programming, Systems, Languages, and Applications. 212--213.
[9]
Martin Bravenboer, Karl Trygve Kalleberg, Rob Vermaas, and Eelco Visser. 2008. Stratego/XT 0.17. A Language and Toolset for Program Transformation. Science of Computer Programming 72, 1--2 (2008), 52--70.
[10]
Build in the Cloud 2017. Build in the Cloud: How the Build System works. (2017). http://google-engtools.blogspot.com/2011/08/build-in-cloud-how-build-system-works.html.
[11]
Byte Buddy 2017. Byte Buddy. (2017). https://github.com/raphw/byte-buddy.
[12]
Lianping Chen. 2015. Continuous Delivery: Huge Benefits, but Challenges Too. Software 32, 2 (2015), 50--54.
[13]
Yih-Farn Chen, David S. Rosenblum, and Kiem-Phong Vo. 1994. TestTube: A System for Selective Regression Testing. In International Conference on Software Engineering. 211--220.
[14]
Julien Cohen. 2016. Renaming Global Variables in C Mechanically Proved Correct. In International Workshop on Verification and Program Transformation. 50--64.
[15]
James R. Cordy. 2006. The TXL Source Transformation Language. Science of Computer Programming 61, 3 (2006), 190--210.
[16]
Brett Daniel, Danny Dig, Kely Garcia, and Darko Marinov. 2007. Automated Testing of Refactoring Engines. In Fundamental Approaches to Software Engineering. 185--194.
[17]
EclipseJDTWebPage 2017. Eclipse Java development tools (JDT). http://eclipse.org/jdt. (2017).
[18]
EclipseWebPage 2015. Eclipse Indigo. (2015). https://eclipse.org.
[19]
Ekstazi 2017. Ekstazi: Lightweight Test Selection. (2017). http://www.ekstazi.org.
[20]
Sebastian Elbaum, Gregg Rothermel, and John Penix. 2014. Techniques for Improving Regression Testing in Continuous Integration Development Environments. In International Symposium on Foundations of Software Engineering. 235--245.
[21]
Emelie Engström and Per Runeson. 2010. A Qualitative Survey of Regression Testing Practices. In Product-Focused Software Process Improvement. 3--16.
[22]
Emelie Engström, Per Runeson, and Mats Skoglund. 2010. A Systematic Review on Regression Test Selection Techniques. Journal of Information and Software Technology 52, 1 (2010), 14--30.
[23]
Emelie Engström, Mats Skoglund, and Per Runeson. 2008. Empirical Evaluations of Regression Test Selection Techniques: A Systematic Review. In International Symposium on Empirical Software Engineering and Measurement. 22--31.
[24]
M. Fowler, K. Beck, J. Brant, W. Opdyke, and D. Roberts. 1999. Refactoring: Improving the Design of Existing Code. Adison-Wesley.
[25]
Z. Gao, Y. Liang, M. B. Cohen, A. M. Memon, and Z. Wang. 2015. Making System User Interactive Tests Repeatable: When and What Should We Control?. In International Conference on Software Engineering, Vol. 1. 55--65.
[26]
Xi Ge and Emerson Murphy-Hill. 2014. Manual Refactoring Changes with Automated Refactoring Validation. In International Conference on Software Engineering. 1095--1105.
[27]
Milos Gligoric, Farnaz Behrang, Yilong Li, Jeffrey Overbey, Munawar Hafiz, and Darko Marinov. 2013. Systematic Testing of Refactoring Engines on Real Software Projects. In European Conference on Object-Oriented Programming. 629--653.
[28]
Milos Gligoric, Lamyaa Eloussi, and Darko Marinov. 2015. Practical Regression Test Selection with Dynamic File Dependencies. In International Symposium on Software Testing and Analysis. 211--222.
[29]
Milos Gligoric, Stas Negara, Owolabi Legunsen, and Darko Marinov. 2014. An Empirical Evaluation and Comparison of Manual and Automated Test Selection. In Automated Software Engineering. 361--372.
[30]
Jean Hartmann. 2007. Applying Selective Revalidation Techniques at Microsoft. In Pacific Northwest Software Quality Conference. 255--265.
[31]
Kim Herzig, Michaela Greiler, Jacek Czerwonka, and Brendan Murphy. 2015. The Art of Testing Less without Sacrificing Quality. In International Conference on Software Engineering. 483--493.
[32]
Mark Hills, Paul Klint, and Jurgen J. Vinju. 2012. Scripting a Refactoring with Rascal and Eclipse. In Workshop on Refactoring Tools. 40--49.
[33]
Michael Hilton, Timothy Tunnell, Kai Huang, Darko Marinov, and Danny Dig. 2016. Usage, Costs, and Benefits of Continuous Integration in Open-Source Projects. In Automated Software Engineering. 426--437.
[34]
IntelliJIdeaWebPage 2017. IntelliJ IDEA. http://www.jetbrains.com/idea. (2017).
[35]
JaCoCoWebPage 2017. JaCoCo Java Code Coverage Library. (2017). http://eclemma.org/jacoco/.
[36]
JDTRefactoringMenuWebPage 2017. Eclipse JDT Refactorings Menu. http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fref-menu-refactor.htm. (2017).
[37]
JDTRefactoringWebPage 2017. Eclipse JDT Refactoring Support. http://help.eclipse.org/mars/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Fconcepts%2Fconcept-refactoring.htm. (2017).
[38]
Jongwook Kim, Don Batory, and Danny Dig. 2015. Scripting Parametric Refactorings in Java to Retrofit Design Patterns. In International Conference on Software Maintenance and Evolution. 211--220.
[39]
Jongwook Kim, Don Batory, Danny Dig, and Maider Azanza. 2016. Improving Refactoring Speed by 10X. In International Conference on Software Engineering. 1145--1156.
[40]
Miryung Kim, Matthew Gee, Alex Loh, and Napol Rachatasumrit. 2010. Reffinder: a Refactoring Reconstruction Tool Based on Logic Query Templates. In International Symposium on Foundations of Software Engineering. 371--372.
[41]
David Chenho Kung, Jerry Gao, Pei Hsia, Jeremy Lin, and Yasufumi Toyoshima. 1995. Class Firewall, Test Order, and Regression Testing of Object-Oriented Programs. Journal of Object-Oriented Programming 8, 2 (1995), 51--65.
[42]
Owolabi Legunsen, Farah Hariri, August Shi, Yafeng Lu, Lingming Zhang, and Darko Marinov. 2016. An Extensive Study of Static Regression Test Selection in Modern Software Evolution. In International Symposium on Foundations of Software Engineering. 583--594.
[43]
Huiqing Li and Simon Thompson. 2012. A Domain-Specific Language for Scripting Refactorings in Erlang. In Fundamental Approaches to Software Engineering. 501--515.
[44]
Yafeng Lu, Yiling Lou, Shiyang Cheng, Lingming Zhang, Dan Hao, Yangfan Zhou, and Lu Zhang. 2016. How Does Regression Test Prioritization Perform in RealWorld Software Evolution?. In International Conference on Software Engineering. 535--546.
[45]
Tom Mens and Tom Tourwe. 2001. A Declarative Evolution Framework for Object-Oriented Design Patterns. In International Conference on Software Maintenance. 570--579.
[46]
Melina Mongiovi, Rohit Gheyi, Gustavo Soares, Leopoldo Teixeira, and Paulo Borba. 2014. Making Refactoring Safer Through Impact Analysis. Science of Computer Programming 93 (2014), 39--64.
[47]
Michael Mortensen, Sudipto Ghosh, and James M. Bieman. 2006. Testing During Refactoring: Adding Aspects to Legacy Systems. In International Symposium on Software Reliability Engineering. 221--230.
[48]
Emerson Murphy-Hill, Chris Parnin, and Andrew P. Black. 2009. How We Refactor, and How We Know It. In International Conference on Software Engineering. 287--297.
[49]
Daniel Di Nardo, Nadia Alshahwan, Lionel Briand, and Yvan Labiche. 2015. Coverage-based Regression Test Case Selection, Minimization and Prioritization: A Case Study on an Industrial System. Journal of Software Testing, Verification and Reliability 25, 4 (2015), 371--396.
[50]
NetBeansWebPage 2017. NetBeans. https://netbeans.org. (2017).
[51]
William F. Opdyke. 1992. Refactoring Object-Oriented Frameworks. Ph.D. Dissertation. University of Illinois at Urbana-Champaign.
[52]
William F. Opdyke and Ralph E. Johnson. 1990. Refactoring: An Aid In Designing Application Frameworks and Evolving Object-Oriented Systems. In Symposium on Object-Oriented Programming Emphasizing Practical Applications. 145--161.
[53]
OracleJDeveloperWebPage 2017. Oracle JDeveloper. http://www.oracle.com/technetwork/developer-tools/jdev. (2017).
[54]
Alessandro Orso and Gregg Rothermel. 2014. Software Testing: A Research Travelogue (2000-2014). In Future of Software Engineering. 117--132.
[55]
Alessandro Orso, Nanjuan Shi, and Mary Jean Harrold. 2004. Scaling Regression Testing to Large Software Systems. In International Symposium on Foundations of Software Engineering. 241--251.
[56]
Carlos Pacheco, Shuvendu K. Lahiri, Michael D. Ernst, and Thomas Ball. 2007. Feedback-Directed Random Test Generation. In International Conference on Software Engineering. 75--84.
[57]
Napol Rachatasumrit and Miryung Kim. 2012. An Empirical Investigation into the Impact of Refactoring on Regression Testing. In International Conference on Software Maintenance. 357--366.
[58]
RefactoringCatalogWebPage 2017. Catalog of Refactorings. http://refactoring.com/catalog/. (2017).
[59]
Xiaoxia Ren, Fenil Shah, Frank Tip, Barbara G. Ryder, and Ophelia Chesley. 2004. Chianti: A Tool for Change Impact Analysis of Java Programs. In Conference on Object-Oriented Programming, Systems, Languages, and Applications. 432--448.
[60]
Gregg Rothermel and Mary Jean Harrold. 1996. Analyzing Regression Test Selection Techniques. Transactions on Software Engineering 22, 8 (1996), 529--551.
[61]
David Saff and Michael D. Ernst. 2004. An Experimental Evaluation of Continuous Testing During Development. In International Symposium on Software Testing and Analysis. 76--85.
[62]
Max Schäfer, Torbjörn Ekman, and Oege de Moor. 2008. Challenge Proposal: Verification of Refactorings. In Workshop on Programming Languages Meets Program Verification. 67--72.
[63]
Danilo Silva, Nikolaos Tsantalis, and Marco Tulio Valente. 2016. Why We Refactor? Confessions of GitHub Contributors. In International Symposium on Foundations of Software Engineering. 858--870.
[64]
Mats Skoglund and Per Runeson. 2007. Improving Class Firewall Regression Test Selection by Removing the Class Firewall. International Journal of Software Engineering and Knowledge Engineering 17, 3 (2007), 359--378.
[65]
SloccountWebPage 2017. SLOCCount. (2017). http://www.dwheeler.com/sloccount.
[66]
Gustavo Soares, Rohit Gheyi, and Tiago Massoni. 2013. Automated Behavioral Testing of Refactoring Engines. Transactions on Software Engineering 39 (2013), 147--162.
[67]
Gustavo Soares, Emerson Murphy-Hill, and Rohit Gheyi. 2013. Live Feedback on Behavioral Changes. In International Workshop on Live Programming. 23--26.
[68]
Amitabh Srivastava and Jay Thiagarajan. 2002. Effectively Prioritizing Tests in Development Environment. In International Symposium on Software Testing and Analysis. 97--106.
[69]
Friedrich Steimann, Christian Kollee, and Jens von Pilgrim. 2011. A Refactoring Constraint Language and its Application to Eiffel. In European Conference on Object-oriented Programming. 255--280.
[70]
TestingAtSpeedAndScaleOfGoogleWeb 2011. Testing at the Speed and Scale of Google. (2011). http://google-engtools.blogspot.com/2011/06/testing-at-speed-and-scale-of-google.html.
[71]
Frank Tip, Robert M. Fuhrer, Adam Kiezun, Michael D. Ernst, Ittai Balaban, and Bjorn De Sutter. 2011. Refactoring using type constraints. ACM Trans. Program. Lang. Syst. 33, 3 (2011), 9:1--9:47.
[72]
Frank Tip, Adam Kiezun, and Dirk Bäumer. 2003. Refactoring for Generalization using Type Constraints. In Conference on Object-Oriented Programming, Systems, Languages, and Applications. 13--26.
[73]
Lance Tokuda and Don Batory. 1999. Evolving Object-Oriented Designs with Refactorings. In Automated Software Engineering. 174--181.
[74]
Tools For Continuous Integration At Google Scale Web 2011. Tools for Continuous Integration at Google Scale. (2011). http://www.youtube.com/watch?v=b52aXZ2yi08.
[75]
Michele Tufano, Fabio Palomba, Gabriele Bavota, Massimiliano Di Penta, Rocco Oliveto, Andrea De Lucia, and Denys Poshyvanyk. 2017. There and Back Again: Can you Compile that Snapshot? Journal of Software: Evolution and Process (2017).
[76]
M.G.J. van den Brand, A. van Deursen, J. Heering, H.A. de Jong, M. de Jonge, T. Kuipers, P. Klint, L. Moonen, P.A. Olivier, J. Scheerder, J.J. Vinju, E. Visser, and J. Visser. 2001. The ASF+SDF Meta-environment: A Component-Based Language Development Environment. 365--370.
[77]
G. Wikstrand, R. Feldt, J. K. Gorantla, W. Zhe, and C. White. 2009. Dynamic Regression Test Selection Based on a File Cache - An Industrial Evaluation. In International Conference on Software Testing, Verification, and Validation. 299--302.
[78]
Guoqing Xu and Atanas Rountev. 2007. Regression Test Selection for AspectJ Software. In International Conference on Software Engineering. 65--74.
[79]
Shin Yoo and Mark Harman. 2012. Regression Testing Minimization, Selection and Prioritization: A Survey. Journal of Software Testing, Verification and Reliability 22, 2 (2012), 67--120.
[80]
Lingming Zhang, Miryung Kim, and Sarfraz Khurshid. 2011. Localizing Failure-Inducing Program Edits Based on Spectrum Information. In International Conference on Software Maintenance. 23--32.

Cited By

View all
  • (2023)Last Diff Analyzer: Multi-language Automated Approver for Behavior-Preserving Code RevisionsProceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3611643.3613870(1693-1704)Online publication date: 30-Nov-2023
  • (2022)Evolution-aware detection of order-dependent flaky testsProceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3533767.3534404(114-125)Online publication date: 18-Jul-2022
  • (2022)Comparing and combining analysis-based and learning-based regression test selectionProceedings of the 3rd ACM/IEEE International Conference on Automation of Software Test10.1145/3524481.3527230(17-28)Online publication date: 17-May-2022
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
ICSE '18: Proceedings of the 40th International Conference on Software Engineering
May 2018
1307 pages
ISBN:9781450356381
DOI:10.1145/3180155
  • Conference Chair:
  • Michel Chaudron,
  • General Chair:
  • Ivica Crnkovic,
  • Program Chairs:
  • Marsha Chechik,
  • Mark Harman
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 27 May 2018

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Reks
  2. behavior-preserving changes
  3. regression test selection

Qualifiers

  • Research-article

Conference

ICSE '18
Sponsor:

Acceptance Rates

Overall Acceptance Rate 276 of 1,856 submissions, 15%

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)16
  • Downloads (Last 6 weeks)4
Reflects downloads up to 16 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2023)Last Diff Analyzer: Multi-language Automated Approver for Behavior-Preserving Code RevisionsProceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3611643.3613870(1693-1704)Online publication date: 30-Nov-2023
  • (2022)Evolution-aware detection of order-dependent flaky testsProceedings of the 31st ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3533767.3534404(114-125)Online publication date: 18-Jul-2022
  • (2022)Comparing and combining analysis-based and learning-based regression test selectionProceedings of the 3rd ACM/IEEE International Conference on Automation of Software Test10.1145/3524481.3527230(17-28)Online publication date: 17-May-2022
  • (2022)RefactoringMiner 2.0IEEE Transactions on Software Engineering10.1109/TSE.2020.300772248:3(930-950)Online publication date: 1-Mar-2022
  • (2022)Regression Testing Approaches, Tools, and Applications in Various Environments2022 4th International Conference on Artificial Intelligence and Speech Technology (AIST)10.1109/AIST55798.2022.10064753(1-6)Online publication date: 9-Dec-2022
  • (2022)Improving Software Regression Testing Using a Machine Learning-Based Method for Test Type SelectionProduct-Focused Software Process Improvement10.1007/978-3-031-21388-5_33(480-496)Online publication date: 21-Nov-2022
  • (2021)A classification of code changes and test types dependencies for improving machine learning based test selectionProceedings of the 17th International Conference on Predictive Models and Data Analytics in Software Engineering10.1145/3475960.3475987(40-49)Online publication date: 19-Aug-2021
  • (2021)Software Testing Effort Estimation and Related ProblemsACM Computing Surveys10.1145/344269454:3(1-38)Online publication date: 17-Apr-2021
  • (2021)A Requirement-based Regression Test Selection Technique in Behavior-Driven Development2021 IEEE 45th Annual Computers, Software, and Applications Conference (COMPSAC)10.1109/COMPSAC51774.2021.00182(1303-1308)Online publication date: Jul-2021
  • (2020)A model for detecting faults in build specificationsProceedings of the ACM on Programming Languages10.1145/34282124:OOPSLA(1-30)Online publication date: 13-Nov-2020
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media