# Machine Learning-Based Test Smell Detection

arXiv: https://arxiv.org/abs/2208.07574 · HTML: https://mlsanity.com/paper/2208.07574/

## Key facts

- Cited by 2 papers in the map (data through 14 Oct 2026).
- Builds on 5 of its 97 references that are in the map.
- First posted on arXiv 16 Aug 2022.

## Builds on (most cited first, 5 of 5)

- [Troubling Trends in Machine Learning Scholarship](https://mlsanity.com/paper/1807.03341/) (2018)
- [PyNose: A Test Smell Detector For Python](https://mlsanity.com/paper/2108.04639/) (2021)
- [Test Smell Detection Tools: A Systematic Mapping Study](https://mlsanity.com/paper/2104.14640/) (2021)
- [Smells in System User Interactive Tests](https://mlsanity.com/paper/2111.02317/) (2021)
- [Does Python Smell Like Java? Tool Support for Design Defect Discovery in Python](https://mlsanity.com/paper/1703.10882/) (2017)

## Built on by (most cited first, 2 of 2)

- [Agentic LMs: Hunting Down Test Smells](https://mlsanity.com/paper/2504.07277/) (2025)
- [Given, When, Then, Again: Mining Subscenario Refactoring Candidates in Behaviour-Driven Test Suites with ML Classifiers and LLM-Judge Baselines](https://mlsanity.com/paper/2605.14568/) (2026)

## Abstract (arXiv)

Context: Test smells are symptoms of sub-optimal design choices adopted when developing test cases. Previous studies have proved their harmfulness for test code maintainability and effectiveness. Therefore, researchers have been proposing automated, heuristic-based techniques to detect them. However, the performance of such detectors is still limited and dependent on thresholds to be tuned. Objective: We propose the design and experimentation of a novel test smell detection approach based on machine learning to detect four test smells. Method: We plan to develop the largest dataset of manually-validated test smells. This dataset will be leveraged to train six machine learners and assess their capabilities in within- and cross-project scenarios. Finally, we plan to compare our approach with state-of-the-art heuristic-based techniques.
