Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3678869.3685687acmconferencesArticle/Chapter ViewAbstractPublication PagesisstaConference Proceedingsconference-collections
short-paper
Open access

Test Smells Learning by a Gamification Approach

Published: 13 September 2024 Publication History

Abstract

The presence of test smells related to low-quality test cases is a known factor contributing to problems in maintaining both test suites and production code. The need to avoid and fix test smells is becoming more and more popular in the scientific community, as well as the importance of knowing how to detect and refactor existing test cases. However, these practices are very little considered in academic testing courses, due also to the difficulty of making them attractive to students. This position paper presents an approach for teaching test smells based on gamification. It exploits a tool, TSGame, that provides a serious game where students can familiarize with test smells by practicing with their detection and removal from JUnit test code. TSGame has been implemented as a Web-based application that allows a teacher to assign students test smell detection and refactoring tasks that they have to accomplish in game sessions. Upon completion of the tasks they have the possibility to gain rewards. A preliminary version of the tool has been validated in the context of a Software Testing course at Master degree level, with 37 students that showed the tool effectiveness and usefulness for test smell learning.

References

[1]
Wajdi Aljedaani, Anthony Peruma, Ahmed Aljohani, Mazen Alotaibi, Mohamed Wiem Mkaouer, Ali Ouni, Christian D. Newman, Abdullatif Ghallab, and Stephanie Ludi. 2021. Test smell detection tools: A systematic mapping study. In ACM International Conference Proceeding Series. 170 – 180. https://doi.org/10.1145/3463274.3463335
[2]
Maurício Aniche, Felienne Hermans, and Arie van Deursen. 2019. Pragmatic Software Testing Education. In Proc. of the ACM Technical Symposium on Computer Science Education. ACM, 414–420. isbn:9781450358903 https://doi.org/10.1145/3287324.3287461
[3]
Gordon Fraser and Andrea Arcuri. 2014. A Large-Scale Evaluation of Automated Unit Test Generation Using EvoSuite. ACM Trans. Softw. Eng. Methodol., 24, 2 (2014), Article 8, dec, 42 pages. issn:1049-331X https://doi.org/10.1145/2685612
[4]
Alessio Gambi, Jonathan Bell, and Andreas Zeller. 2018. Practical Test Dependency Detection. In 2018 IEEE 11th International Conference on Software Testing, Verification and Validation (ICST). 1–11. https://doi.org/10.1109/ICST.2018.00011
[5]
Vahid Garousi, Baris Kucuk, and Michael Felderer. 2019. What we know about smells in software test code. IEEE Software, 36, 3 (2019), 61 – 73. https://doi.org/10.1109/MS.2018.2875843
[6]
Vahid Garousi and Barış Küçük. 2018. Smells in software test code: A survey of knowledge in industry and academia. Journal of Systems and Software, 138 (2018), 52 – 81. https://doi.org/10.1016/j.jss.2017.12.013
[7]
Vahid Garousi, Austen Rainer, Per Lauvås, and Andrea Arcuri. 2020. Software-testing education: A systematic literature mapping. Journal of Systems and Software, 165 (2020), 110570. issn:0164-1212 https://doi.org/10.1016/j.jss.2020.110570
[8]
E.L. Jones. 2001. An experiential approach to incorporating software testing into the computer science curriculum. In 31st Annual Frontiers in Education Conference. Impact on Engineering and Science Education. 2, F3D–7. https://doi.org/10.1109/FIE.2001.963741
[9]
Negar Koochakzadeh and Vahid Garousi. 2010. TeCReVis: A Tool for Test Coverage and Test Redundancy Visualization. In Testing – Practice and Research Techniques. Springer. https://doi.org/10.1007/978-3-642-15585-7_12
[10]
Stefano Lambiase, Andrea Cupito, Fabiano Pecorelli, Andrea De Lucia, and Fabio Palomba. 2020. Just-in-time test smell detection and refactoring: The DARTS project. In IEEE International Conference on Program Comprehension. 441 – 445. https://doi.org/10.1145/3387904.3389296
[11]
A. Panichella, S. Panichella, G. Fraser, A. A. Sawant, and V. J. Hellendoorn. 2022. Test smells 20 years later: detectability, validity, and reliability. Empirical Software Engineering, 27, 7 (2022), https://doi.org/10.1007/s10664-022-10207-5
[12]
Anthony Peruma, Khalid Almalki, Christian D. Newman, Mohamed Wiem Mkaouer, Ali Ouni, and Fabio Palomba. 2020. TsDetect: An open source test smells detection tool. In - Proceedings of ESEC/FSE 2020. 1650 – 1654. https://doi.org/10.1145/3368089.3417921
[13]
Jose Miguel Rojas, Thomas D. White, Benjamin S. Clegg, and Gordon Fraser. 2017. Code Defenders: Crowdsourcing Effective Tests and Subtle Mutants with a Mutation Testing Game. In Proceedings of ICSE 2017. 677 – 688. https://doi.org/10.1109/ICSE.2017.68
[14]
Porfirio Tramontana, Beatriz Marín, Ana C. R. Paiva, Alexandra Mendes, Tanja E. J. Vos, Domenico Amalfitano, Felix Cammaerts, Monique Snoeck, and Anna Rita Fasolino. 2024. State of the Practice in Software Testing Teaching in Four European Countries. In 17th IEEE International Conference on Software Testing, Verification and Validation (ICST) 2024. https://doi.org/10.1109/ICST60714.2024.00015
[15]
Arie van Deursen, Leon Moonen, Alex van den Bergh, and Gerard Kok. 2001. Refactoring test code. In Proc. Int’l Conf. eXtreme Programming and Flexible Processes in Software Engineering (XP).
[16]
Tássio Virgínio, Luana Martins, Larissa Rocha, Railana Santana, Adriana Cruz, Heitor Costa, and Ivan Machado. 2020. JNose: Java Test Smell Detector. SBES ’20. ACM, 564–569. isbn:9781450387538 https://doi.org/10.1145/3422392.3422499

Index Terms

  1. Test Smells Learning by a Gamification Approach

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    Gamify 2024: Proceedings of the 3rd ACM International Workshop on Gamification in Software Development, Verification, and Validation
    September 2024
    37 pages
    ISBN:9798400711138
    DOI:10.1145/3678869
    This work is licensed under a Creative Commons Attribution International 4.0 License.

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 13 September 2024

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Gamification of Learning Activities
    2. Refactoring
    3. Software Testing Education
    4. Test Smells

    Qualifiers

    • Short-paper

    Conference

    Gamify '24
    Sponsor:

    Upcoming Conference

    ISSTA '25

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • 0
      Total Citations
    • 118
      Total Downloads
    • Downloads (Last 12 months)118
    • Downloads (Last 6 weeks)32
    Reflects downloads up to 08 Feb 2025

    Other Metrics

    Citations

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Login options

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media