Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.5555/2820282.2820298acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

Generating refactoring proposals to remove clones from automated system tests

Published: 16 May 2015 Publication History

Abstract

Automated system tests often have many clones, which make them complex to understand and costly to maintain. Unfortunately, removing clones is challenging as there are numerous possibilities of how to refactor them to reuse components such as subroutines. Additionally, clones often overlap partly which makes it particularly difficult to decide which parts to extract. If done wrongly, reuse potential is not leveraged optimally and structures between tests and reuse components will become unnecessarily complex. We present a method to support test engineers in extracting overlapping clones. Using grammar inference algorithms, we generate a refactoring proposal that demonstrates test engineers how overlapping clones can be extracted. Furthermore, we visualize the generated refactoring proposal to make it easily understandable for test engineers. An industrial case study demonstrates that our approach helps test engineers to gain information of the reuse potential of test suites and guides them to perform refactorings.

References

[1]
G. J. Myers and C. Sandler, The Art of Software Testing. John Wiley & Sons, 2004.
[2]
B. Beizer, Software Testing Techniques, 2nd ed. Van Nostrand Reinhold Co., 1990.
[3]
M. J. Harrold, "Testing: a roadmap," in ICSE, 2000.
[4]
M. Blackburn, R. Busser, and A. Nauman, "Why model-based test automation is different and what you should know to get started," in PSQT, 2004.
[5]
M. Fewster and D. Graham, Software test automation: effective use of test execution tools. Addison-Wesley, 1999.
[6]
M. J. Harrold and A. Orso, "Retesting software during development and maintenance," in FoSM, 2008.
[7]
A. Bertolino, "Software testing research: Achievements, challenges, dreams," in FOSE, 2007.
[8]
E. Dustin, J. Rashka, and J. Paul, Automated Software Testing: Introduction, Management, and Performance. Addison-Wesley, 1999.
[9]
B. Hauptmann, M. Junker, S. Eder, E. Juergens, and R. Vaas, "Can clone detection support test comprehension?" in ICPC, 2012.
[10]
C. G. Nevill-Manning, "Inferring sequential structure," Ph.D. dissertation, University of Waikato, 1996.
[11]
A. Deursen, L. M. Moonen, A. Bergh, and G. Kok, "Refactoring test code," Centre for Mathematics and Computer Science, Amsterdam, The Netherlands, Tech. Rep., 2001.
[12]
G. Meszaros, XUnit Test Patterns: Refactoring Test Code. Upper Saddle River, NJ, USA: Prentice Hall PTR, 2006.
[13]
M. Fowler, Refactoring: Improving the Design of Existing Code. Addison-Wesley, 1999.
[14]
F. Lanubile and T. Mallardo, "Inspecting automated test code: A preliminary study," in Agile Processes in Software Engineering and Extreme Programming, ser. LNCS. Springer, 2007, vol. 4536.
[15]
M. Greiler, A. Zaidman, Andy van Deursen, and M.-A. Storey, "Strategies for avoiding text fixture smells during software evolution," in ICST, 2013.
[16]
M. Greiler, A. van Deursen, and M.-A. Storey, "Automated detection of test fixture strategies and smells," Delft University of Technology, Tech. Rep. TUD-SERG-2013-021, 2013.
[17]
H. Neukirchen, B. Zeiss, J. Grabowski, P. Baker, and D. Evans, "Quality assurance for TTCN-3 test specifications," Software Testing, Verification and Reliability, vol. 18, no. 2, 2008.
[18]
H. Neukirchen and M. Bisanz, "Utilising code smells to detect quality problems in TTCN-3 test suites," in Testing of Software and Communicating Systems, ser. LNCS. Springer, 2007, vol. 4581.
[19]
P.-H. Chu, N.-L. Hsueh, H.-H. Chen, and C.-H. Liu, "A test case refactoring approach for pattern-based software development," Software Quality Journal, vol. 20, no. 1, 2012.
[20]
G. Bavota, A. Qusef, R. Oliveto, A. De Lucia, and D. Binkley, "An empirical analysis of the distribution of unit test smells and their impact on software maintenance," in ICSM, 2012.
[21]
G. Bavota, A. Qusef, R. Oliveto, A. De Lucia, and D. Binkly, "Are test smells really harmful? an empirical study," Empirical Software Engineering, 2014.
[22]
B. Hauptmann, M. Junker, S. Eder, L. Heinemann, R. Vaas, and P. Braun, "Hunting for smells in natural language tests," in Proceedings of ICSE'13, 2013.
[23]
T. Mens and T. Tourwe, "A survey of software refactoring," IEEE Transactions on Software Engineering, vol. 30, no. 2, 2004.
[24]
E. Guerra and C. Fernandes, "Refactoring test code safely," in ICSEA, 2007.
[25]
B. Zeiss, H. Neukirchen, J. Grabowski, D. Evans, and P. Baker, "Refactoring and metrics for TTCN-3 test suites," in System Analysis and Modeling: Language Profiles, ser. LNCS. Springer, 2006, vol. 4320.
[26]
W. kae Chen, Z.-W. Shen, and C.-M. Chang, "Gui test script organization with component abstraction," in SSIRI, 2008.
[27]
W.-K. Chen and J.-C. Wang, "Bad smells and refactoring methods for gui test scripts," in SSNPD, 2012.
[28]
B. van Rompaey and S. Demeyer, "Exploring the composition of unit test suites," in ASE, 2008.
[29]
M. Breugelmans and B. Van Rompaey, "Testq: Exploring structural and maintenance characteristics of unit test suites," in WASDeTT, 2008.
[30]
B. Hauptmann, V. Bauer, and M. Junker, "Using edge bundle views for clone visualization," in IWSC, 2012.
[31]
C. Wohlin, P. Runeson, M. Höst, M. C. Ohlsson, B. Regnell, and A. Wesslén, Experimentation in Software Engineering: An Introduction. Kluwer Academic, 2000.
[32]
E. Juergens, F. Deissenboeck, and B. Hummel, "Clonedetective - a workbench for clone detection research," in ICSE, 2009.
[33]
C. G. Nevill-Manning and I. H. Witten, "Identifying hierarchical structure in sequences: A linear-time algorithm," Journal of Artificial Intelligence Research, no. 7, 1997.

Cited By

View all
  • (2018)Fine-grained test minimizationProceedings of the 40th International Conference on Software Engineering10.1145/3180155.3180203(210-221)Online publication date: 27-May-2018

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICPC '15: Proceedings of the 2015 IEEE 23rd International Conference on Program Comprehension
May 2015
325 pages

Sponsors

Publisher

IEEE Press

Publication History

Published: 16 May 2015

Check for updates

Author Tags

  1. automated testing
  2. refactoring
  3. test clones

Qualifiers

  • Research-article

Conference

ICSE '15
Sponsor:

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)0
Reflects downloads up to 25 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2018)Fine-grained test minimizationProceedings of the 40th International Conference on Software Engineering10.1145/3180155.3180203(210-221)Online publication date: 27-May-2018

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