skip to main content
10.1145/3242163.3242168acmconferencesArticle/Chapter ViewAbstractPublication PagesaseConference Proceedingsconference-collections
short-paper

Test behaviour detection as a test refactoring safety

Published: 04 September 2018 Publication History

Abstract

When refactoring production code, software developers rely on an automated test suite as a safeguard. However, when refactoring the test suite itself, there is no such safeguard. Therefore, there is a need for tool support that can verify if a refactored test suite preserves its behaviour pre- and post-refactoring. In this work we present T-CORE (Test COde REfactoring tool); a tool that captures the behaviour of Java tests in the form of a Test Behaviour Tree. T-CORE allows developers to verify that the refactoring of a test suite has preserved the behaviour of the test.

References

[1]
Gabriele Bavota, Abdallah Qusef, Rocco Oliveto, Andrea De Lucia, and David Binkley. 2012. An empirical analysis of the distribution of unit test smells and their impact on software maintenance. In Software Maintenance (ICSM), 2012 28th IEEE International Conference on. IEEE, 56–65.
[2]
Gabriele Bavota, Abdallah Qusef, Rocco Oliveto, Andrea De Lucia, and Dave Binkley. 2015. Are test smells really harmful? an empirical study. Empirical Software Engineering 20, 4 (2015), 1052–1094.
[3]
Lori A. Clarke. 1976. A Program Testing System. In Proceedings of the 1976 Annual Conference (ACM ’76). ACM, New York, NY, USA, 488–491. 1145/800191.805647
[4]
Elfriede Dustin. 2002. Effective Software Testing: 50 Ways to Improve Your Software Testing. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA.
[5]
Robert Dyer, Hoan Anh Nguyen, Hridesh Rajan, and Tien N. Nguyen. 2013. Boa: A Language and Infrastructure for Analyzing Ultra-Large-Scale Software Repositories. In 35th International Conference on Software Engineering (ICSE 2013). 422–431.
[6]
Robert Neil Faiman Jr. 1998. Method of constructing a constant-folding mechanism in a multilanguage optimizing compiler. US Patent 5,836,014.
[7]
Vahid Garousi et al. 2017. Smells in software test code: a survey of knowledge in industry and academia. Journal of Systems and Software (2017).
[8]
Miguel Grinberg. 2014. Flask Web Development: Developing Web Applications with Python (1st ed.). O’Reilly Media, Inc.
[9]
James C. King. 1976. Symbolic Execution and Program Testing. Commun. ACM 19, 7 (July 1976), 385–394.
[10]
A Jefferson Offutt and Roland H Untch. 2001. Mutation 2000: Uniting the orthogonal. In Mutation testing for the new century. Springer, 34–44.
[11]
Terence J. Parr and Russell W. Quong. 1995. ANTLR: A predicated-LL (k) parser generator. Software: Practice and Experience 25, 7 (1995), 789–810.
[12]
Ali Parsai, Alessandro Murgia, Quinten David Soetens, and Serge Demeyer. 2015. Mutation testing as a safety net for test code refactoring. In Scientific Workshop Proceedings of the XP2015. ACM, 8.
[13]
Jens Uwe Pipka. 2002. Refactoring in a “test first”-world. In Proc. Third Int’l Conf. eXtreme Programming and Flexible Processes in Software Eng.
[14]
Jean-Paul Tremblay and Paul G Sorenson. 1985. Theory and Practice of Compiler Writing. McGraw-Hill, Inc.
[15]
Brent van Bladel and Serge Demeyer. 2017. Test Refactoring: a Research Agenda. In Post-proceedings of the Tenth Seminar on Advanced Techniques and Tools for Software Evolution. CEUR.
[16]
Arie Van Deursen and Leon Moonen. 2002. The video store revisited–thoughts on refactoring and testing. In Proc. 3rd Int’l Conf. eXtreme Programming and Flexible Processes in Software Engineering. Citeseer, 71–76.
[17]
A Van Deursen, L Moonen, A van den Bergh, and G Kok. 2001. Refactoring test code. In 2nd International Conference on Extreme Programming and Flexible Processes in Software Engineering (XP2001). University of Cagliary, 92–95.
[18]
Bart Van Rompaey, Bart Du Bois, and Serge Demeyer. 2006. Characterizing the relative significance of a test smell. In 2006 22nd IEEE International Conference on Software Maintenance. IEEE, 391–400.
[19]
Hong Zhu, Patrick AV Hall, and John HR May. 1997. Software unit test coverage and adequacy. Acm computing surveys (csur) 29, 4 (1997), 366–427. Abstract 1 Introduction 2 Related Work 3 T-CORE 3.1 Test Behaviour Detection 3.2 Architecture 4 Usage scenario 5 Validation 5.1 Benchmark 5.2 Open-source Projects 6 Conclusion References

Cited By

View all
  • (2023)Moving towards a Mutant-Based Testing Tool for Verifying Behavior Maintenance in Test Code RefactoringsComputers10.3390/computers1211023012:11(230)Online publication date: 13-Nov-2023
  • (2023)Automatic Generation of Accurate Test Templates based on JUnit AssertsProceedings of the 7th International Conference on Algorithms, Computing and Systems10.1145/3631908.3631926(125-131)Online publication date: 19-Oct-2023
  • (2023)Rubbing salt in the wound? A large-scale investigation into the effects of refactoring on securityEmpirical Software Engineering10.1007/s10664-023-10287-x28:4Online publication date: 24-May-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
IWoR 2018: Proceedings of the 2nd International Workshop on Refactoring
September 2018
45 pages
ISBN:9781450359740
DOI:10.1145/3242163
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: 04 September 2018

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. dynamic analysis
  2. refactoring
  3. testing

Qualifiers

  • Short-paper

Conference

ASE '18
Sponsor:

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)5
  • Downloads (Last 6 weeks)0
Reflects downloads up to 17 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2023)Moving towards a Mutant-Based Testing Tool for Verifying Behavior Maintenance in Test Code RefactoringsComputers10.3390/computers1211023012:11(230)Online publication date: 13-Nov-2023
  • (2023)Automatic Generation of Accurate Test Templates based on JUnit AssertsProceedings of the 7th International Conference on Algorithms, Computing and Systems10.1145/3631908.3631926(125-131)Online publication date: 19-Oct-2023
  • (2023)Rubbing salt in the wound? A large-scale investigation into the effects of refactoring on securityEmpirical Software Engineering10.1007/s10664-023-10287-x28:4Online publication date: 24-May-2023
  • (2023)On the diffusion of test smells and their relationship with test code quality of Java projectsJournal of Software: Evolution and Process10.1002/smr.2532Online publication date: 18-Jan-2023
  • (2022)Behavior-based test smells refactoringProceedings of the ACM/IEEE 44th International Conference on Software Engineering: Companion Proceedings10.1145/3510454.3517059(261-263)Online publication date: 21-May-2022
  • (2022)Behavior-based test smells refactoring : Toward an automatic approach to refactoring Eager Test and Lazy Test smells2022 IEEE/ACM 44th International Conference on Software Engineering: Companion Proceedings (ICSE-Companion)10.1109/ICSE-Companion55297.2022.9793823(261-263)Online publication date: May-2022
  • (2022)A multi-label classification approach for detecting test smells over java projectsJournal of King Saud University - Computer and Information Sciences10.1016/j.jksuci.2021.10.00834:10(8692-8701)Online publication date: Nov-2022
  • (2019)A Novel Approach for Detecting Type-IV Clones in Test Code2019 IEEE 13th International Workshop on Software Clones (IWSC)10.1109/IWSC.2019.8665855(8-12)Online publication date: Feb-2019
  • (2019)Towards an Extensible Architecture for Refactoring Test CodeComputational Science and Its Applications – ICCSA 201910.1007/978-3-030-24305-0_34(456-471)Online publication date: 29-Jun-2019
  • (undefined)Automated Recommendation of Extracting Local Variable RefactoringsACM Transactions on Software Engineering and Methodology10.1145/3715110

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media