skip to main content
10.1145/3337932.3338815acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
short-paper

SoCRATES: Scala radar for test smells

Published: 17 July 2019 Publication History

Abstract

Test smells are indications of poorly designed unit tests. Previous studies have demonstrated their negative impact on test understanding and maintenance. Moreover, surveys show that developers are not able to identify test smells, hindering optimal software quality. Automated tools can aid developers to handle these issues and detect test smells in the early stage of software development. However, few tools are publicly available and all of them target JUnit -- the most popular testing framework in Java. To overcome these limitations, we propose SoCRATES. This fully automated tool is able to identify six test smells in Scala Test which is the most prevalent testing framework in Scala. An empirical investigation on 164 Scala projects shows that our tool is able to reach a high precision without sacrificing recall. Moreover, the results show that Scala projects have a lower diffusion than Java projects. We make SoCRATES publicly available as an IntelliJ IDEA plugin, as well as an open-source project in order to facilitate the detection of test smells.

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]
Kent Beck. 2003. Test-driven development: by example. Addison-Wesley Professional.
[4]
Jonas De Bleser, Dario Di Nucci, and Coen De Roover. 2019. Appendix: SoCRATES - Scala Radar for Test Smells. (4 2019).
[5]
Jonas De Bleser, Dario Di Nucci, and Coen De Roover. 2019. Assessing Diffusion and Perception of Test Smells in Scala Projects. In Proceedings of the 16th International Conference on Mining Software Repositories.
[6]
M. Greiler, Arie van Deursen, and M.-A. Storey. 2013. Automated Detection of Test Fixture Strategies and Smells. In Proceedings of the International Conference on Software Testing, Verification and Validation (ICST). 322--331.
[7]
Michaela Greiler, Andy Zaidman, Arie van Deursen, and M.-A. Storey. 2013. Strategies for Avoiding Text Fixture Smells During Software Evolution. In Proceedings of the 10th Working Conference on Mining Software Repositories (MSR). IEEE, 387--396.
[8]
Roland Kuhn, Brian Hanafee, and Jamie Allen. 2017. Reactive design patterns. Manning Publications Company.
[9]
Michael Nash and Wade Waldron. 2016. Applied Akka Patterns: A Hands-On Guide to Designing Distributed Applications. "O'Reilly Media, Inc.".
[10]
Martin Odersky, Philippe Altherr, Vincent Cremet, Burak Emir, Stphane Micheloud, Nikolay Mihaylov, Michel Schinz, Erik Stenman, and Matthias Zenger. 2007. The Scala language specification. (2007).
[11]
Fabio Palomba, Gabriele Bavota, Massimiliano Di Penta, Fausto Fasano, Rocco Oliveto, and Andrea De Lucia. 2018. On the diffuseness and the impact on maintainability of code smells: a large scale empirical investigation. Empirical Software Engineering 23, 3 (2018), 1188--1221.
[12]
Fabio Palomba, Dario Di Nucci, Annibale Panichella, Rocco Oliveto, and Andrea De Lucia. 2016. On the diffusion of test smells in automatically generated test code: An empirical study. In Proceedings of the 9th International Workshop on Search-Based Software Testing. ACM, 5--14.
[13]
A. Schneider. 2000. JUnit best practices (Java World).
[14]
Davide Spadini, Fabio Palomba, Andy Zaidman, Magiel Bruntink, and Alberto Bacchelli. 2018. On the relation of test smells to software code quality. In Proceedings of the International Conference on Software Maintenance and Evolution (ICSME). IEEE.
[15]
Michele Tufano, Fabio Palomba, Gabriele Bavota, Massimiliano Di Penta, Rocco Oliveto, Andrea De Lucia, and Denys Poshyvanyk. 2016. An Empirical Investigation into the Nature of Test Smells. In Proceedings of the 31st IEEE/ACM International Conference on Automated Software Engineering (ASE 2016). ACM, New York, NY, USA, 4--15.
[16]
Arie van Deursen, Leon Moonen, Alex Bergh, and Gerard Kok. 2001. Refactoring Test Code. In Proceedings of the 2nd International Conference on Extreme Programming and Flexible Processes in Software Engineering (XP). 92--95.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
Scala '19: Proceedings of the Tenth ACM SIGPLAN Symposium on Scala
July 2019
37 pages
ISBN:9781450368247
DOI:10.1145/3337932
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: 17 July 2019

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Scala
  2. software quality
  3. test smells
  4. tool

Qualifiers

  • Short-paper

Conference

Scala '19
Sponsor:
Scala '19: Tenth ACM SIGPLAN Scala Symposium
July 17, 2019
London, United Kingdom

Acceptance Rates

Scala '19 Paper Acceptance Rate 5 of 6 submissions, 83%;
Overall Acceptance Rate 5 of 6 submissions, 83%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

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

Other Metrics

Citations

Cited By

View all

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