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

Insights from the Field: Exploring Students' Perspectives on Bad Unit Testing Practices

Published: 03 July 2024 Publication History
  • Get Citation Alerts
  • Abstract

    Educating students about software testing practices is integral to the curricula of many computer science-related courses and typically involves students writing unit tests. Similar to production/source code, students might inadvertently deviate from established unit testing best practices, and introduce problematic code, referred to as test smells, into their test suites. Given the extensive catalog of test smells, it becomes challenging for students to identify test smells in their code, especially for those who lack experience with testing practices. In this experience report, we aim to increase students' awareness of bad unit testing practices, and detail the outcomes of having 184 students from three higher educational institutes utilize an IDE plugin to automatically detect test smells in their code. Our findings show that while students report on the plugin's usefulness in learning about and detecting test smells, they also identify specific test smells that they consider harmless. We anticipate that our findings will support academia in refining course curricula on unit testing and enabling educators to support students with code review strategies of test code.

    References

    [1]
    Kalle Aaltonen, Petri Ihantola, and Otto Sepp"al"a. 2010. Mutation analysis vs. code coverage in automated assessment of students' testing skills. In Proceedings of the ACM international conference companion on Object oriented programming systems languages and applications companion. 153--160.
    [2]
    ACM. 2023. Curricula Recommendations. https://www.acm.org/education/curricula-recommendations. (Accessed on 08/18/2023).
    [3]
    Wajdi Aljedaani, Mohamed Wiem Mkaouer, Anthony Peruma, and Stephanie Ludi. 2023. Do the Test Smells Assertion Roulette and Eager Test Impact Students' Troubleshooting and Debugging Capabilities?. In 2023 IEEE/ACM 45th International Conference on Software Engineering: Software Engineering Education and Training (ICSE-SEET). 29--39. https://doi.org/10.1109/ICSE-SEET58685.2023.00009
    [4]
    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. Evaluation and Assessment in Software Engineering (2021), 170--180.
    [5]
    Prashant Baheti, Laurie Williams, Edward Gehringer, and David Stotts. 2002. Exploring pair programming in distributed object-oriented team projects. In Educator's Workshop, OOPSLA. Citeseer, 4--8.
    [6]
    Gina R Bai, Brian Clee, Nischal Shrestha, Carl Chapman, Cimone Wright, and Kathryn T Stolee. 2019. Exploring tools and strategies used during regular expression composition tasks. In 2019 IEEE/ACM 27th International Conference on Program Comprehension (ICPC). IEEE, 197--208.
    [7]
    Gina R. Bai, Kai Presler-Marshall, Susan R. Fisk, and Kathryn T. Stolee. 2022a. Is Assertion Roulette still a test smell? An experiment from the perspective of testing education. In 2022 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC). 1--7. https://doi.org/10.1109/VL/HCC53370.2022.9833107
    [8]
    Gina R Bai, Kai Presler-Marshall, Thomas W Price, and Kathryn T Stolee. 2022b. Check It Off: Exploring the Impact of a Checklist Intervention on the Quality of Student-authored Unit Tests. In Proceedings of the 27th ACM Conference on on Innovation and Technology in Computer Science Education Vol. 1. 276--282.
    [9]
    Gina R Bai, Justin Smith, and Kathryn T Stolee. 2021. How students unit test: Perceptions, practices, and pitfalls. In Proceedings of the 26th ACM Conference on Innovation and Technology in Computer Science Education V. 1. 248--254.
    [10]
    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 2012 28th IEEE International Conference on Software Maintenance (ICSM). 56--65. https://doi.org/10.1109/ICSM.2012.6405253
    [11]
    Gabriele Bavota, Abdallah Qusef, Rocco Oliveto, Andrea De Lucia, and Dave Binkley. 2015. Are test smells really harmful? an empirical study. Empirical Software Engineering, Vol. 20 (2015), 1052--1094.
    [12]
    Kevin Buffardi and Juan Aguirre-Ayala. 2021. Unit test smells and accuracy of software engineering student test suites. In Proceedings of the 26th ACM Conference on Innovation and Technology in Computer Science Education V. 1. 234--240.
    [13]
    Bruno Camara, Marco Silva, Andre Endo, and Silvia Vergilio. 2021. On the Use of Test Smells for Prediction of Flaky Tests. In Proceedings of the 6th Brazilian Symposium on Systematic and Automated Software Testing (Joinville, Brazil) (SAST '21). Association for Computing Machinery, New York, NY, USA, 46--54. https://doi.org/10.1145/3482909.3482916
    [14]
    Daniela S Cruzes and Tore Dyba. 2011. Recommended steps for thematic synthesis in software engineering. In 2011 international symposium on empirical software engineering and measurement. IEEE, 275--284.
    [15]
    Stephen H Edwards. 2004. Using software testing to move students from trial-and-error to reflection-in-action. In Proceedings of the 35th SIGCSE technical symposium on Computer science education. 26--30.
    [16]
    Vahid Garousi and Barics Kücc ük. 2018. Smells in software test code: A survey of knowledge in industry and academia. Journal of systems and software, Vol. 138 (2018), 52--81.
    [17]
    Ayaan M Kazerouni, Stephen H Edwards, and Clifford A Shaffer. 2017. Quantifying incremental development practices and their relationship to procrastination. In Proceedings of the 2017 ACM Conference on International Computing Education Research. 191--199.
    [18]
    Dong Jae Kim, Tse-Hsun Chen, and Jinqiu Yang. 2021. The secret life of test smells-an empirical study on test smell evolution and maintenance. Empirical Software Engineering, Vol. 26 (2021), 1--47.
    [19]
    Gerard Meszaros. 2007. xUnit test patterns: Refactoring test code. Pearson Education.
    [20]
    Anthony Peruma. 2024 a. Artifacts. https://doi.org/10.6084/m9.figshare.23993511.v1.
    [21]
    Anthony Peruma. 2024 b. TSDetect - IntelliJ Plugin. https://github.com/TestSmells/TSDetect
    [22]
    Anthony Peruma, Khalid Almalki, Christian D. Newman, Mohamed Wiem Mkaouer, Ali Ouni, and Fabio Palomba. 2019. On the Distribution of Test Smells in Open Source Android Applications: An Exploratory Study. In Proceedings of the 29th Annual International Conference on Computer Science and Software Engineering (Toronto, Ontario, Canada) (CASCON '19). IBM Corp., USA, 193--202.
    [23]
    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 the 28th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering (Virtual Event, USA) (ESEC/FSE 2020). Association for Computing Machinery, New York, NY, USA, 1650--1654. https://doi.org/10.1145/3368089.3417921
    [24]
    TestEd. 2023. The 2nd Testing Education Workshop. https://testedworkshop.github.io/2023/. (Accessed on 08/18/2023).
    [25]
    Brent Van Bladel and Serge Demeyer. 2017. Test refactoring: a research agenda. In CEUR workshop proceedings, Vol. 2070. 1--6.
    [26]
    Arie Van Deursen, Leon Moonen, Alex Van Den Bergh, and Gerard Kok. 2001. Refactoring test code. In Proceedings of the 2nd international conference on extreme programming and flexible processes in software engineering (XP2001). Citeseer, 92--95.
    [27]
    Laurie Williams and Richard L Upchurch. 2001. In support of student pair-programming. ACM Sigcse Bulletin, Vol. 33, 1 (2001), 327--331.

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    ITiCSE 2024: Proceedings of the 2024 on Innovation and Technology in Computer Science Education V. 1
    July 2024
    776 pages
    ISBN:9798400706004
    DOI:10.1145/3649217
    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 the author(s) 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: 03 July 2024

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. code quality
    2. education
    3. open-source tool
    4. software engineering
    5. test smells
    6. tsdetect
    7. unit testing

    Qualifiers

    • Research-article

    Conference

    ITiCSE 2024
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 552 of 1,613 submissions, 34%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • 0
      Total Citations
    • 24
      Total Downloads
    • Downloads (Last 12 months)24
    • Downloads (Last 6 weeks)24
    Reflects downloads up to 10 Aug 2024

    Other Metrics

    Citations

    View Options

    Get Access

    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