A Catalog of Transformations to Remove Smells From Natural Language Tests (2404.16992v1)
Abstract: Test smells can pose difficulties during testing activities, such as poor maintainability, non-deterministic behavior, and incomplete verification. Existing research has extensively addressed test smells in automated software tests but little attention has been given to smells in natural language tests. While some research has identified and catalogued such smells, there is a lack of systematic approaches for their removal. Consequently, there is also a lack of tools to automatically identify and remove natural language test smells. This paper introduces a catalog of transformations designed to remove seven natural language test smells and a companion tool implemented using NLP techniques. Our work aims to enhance the quality and reliability of natural language tests during software development. The research employs a two-fold empirical strategy to evaluate its contributions. First, a survey involving 15 software testing professionals assesses the acceptance and usefulness of the catalog's transformations. Second, an empirical study evaluates our tool to remove natural language test smells by analyzing a sample of real-practice tests from the Ubuntu OS. The results indicate that software testing professionals find the transformations valuable. Additionally, the automated tool demonstrates a good level of precision, as evidenced by a F-Measure rate of 83.70%
- Test Smell Detection Tools: A Systematic Mapping Study. In EASE 2021. 170–180.
- Towards a catalog of usability smells. In SAC 2015. 175–181.
- Organizational research: Determining appropriate sample size in survey research. Information technology, learning, and performance journal 19, 1 (2001), 43–50.
- Are test smells really harmful? an empirical study. Empirical Software Engineering 20 (2015), 1052–1094.
- Rapid quality assurance with Requirements Smells. Journal of Systems and Software 123 (2017), 190–213.
- How Do Practitioners Interpret Conditionals in Requirements?. In PROFES 2021. 85–102.
- Automatic creation of acceptance tests by extracting conditionals from requirements: NLP approach and case study. Journal of Systems and Software 197 (2023), 111549.
- Martin Fowler and Kent Beck. 1997. Refactoring: Improving the design of existing code.
- 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.
- Hunting for smells in natural language tests. In ICSE 2013. 1217–1220.
- Can clone detection support test comprehension?. In ICPC 2012. 209–218.
- Matthew Honnibal and Ines Montani. 2024. spaCy – Industrial-strength Natural Language Processing in Python. https://spacy.io/
- Building a Large Annotated Corpus of English: The Penn Treebank. Computational Linguistics 19, 2 (1993), 313–330. https://aclanthology.org/J93-2004
- On the diffusion of test smells and their relationship with test code quality of Java projects. Journal of Software: Evolution and Process (2023).
- Automating Test-Specific Refactoring Mining: A Mixed-Method Investigation. In SCAM 2023. 13–24.
- Gerard Meszaros. 2006. XUnit Test Patterns: Refactoring Test Code. Prentice Hall PTR, USA.
- Universal Dependencies v1: A Multilingual Treebank Collection. In LREC 16. 1659–1666.
- Kostadin Rajkovic and Eduard Paul Enoiu. 2022. NALABS: Detecting Bad Smells in Natural Language Requirements and Test Specifications. Technical Report. Mälardalen Real-Time Research Centre, Mälardalen University. http://www.es.mdu.se/publications/6382-
- Manual Tests Do Smell! Cataloging and Identifying Natural Language Test Smells. In ESEM 2023. 1–11.
- Refactoring Test Smells: A Perspective from Open-Source Developers. In SAST 2020. 50–59.
- Refactoring Test Smells With JUnit 5: Why Should Developers Keep Up-to-Date? IEEE Transactions on Software Engineering 49, 3 (2023), 1152–1170.
- Investigating Severity Thresholds for Test Smells. In MSR 2020. 311–321.
- A Catalog of Transformations to Remove Test Smells in Natural Language Tests - Replication Package. https://doi.org/10.6084/m9.figshare.24993906.v1
- Manual Test Alchemist. Retrieved April 19, 2024 from https://github.com/easy-software-ufal/manual-test-alchemist
- Ubuntu. 2024. Ubuntu Manual Tests in Launchpad. https://launchpad.net/ubuntu-manual-tests
- Refactoring test code. In XP 2001. 92–95.