Finding anti-patterns in test code with TestHound

Designing automated tests is a challenging task. One important concern is how to design test fixtures, i.e. code that initializes and configures the system under test so that it is in an appropriate state for running particular automated tests. Test designers may have to choose between writing in-line fixture code for each test or refactor fixture code so that it can be reused for other tests. Deciding on which approach to use is a balancing act, often trading off maintenance overhead with slow test execution. Additionally, over time, test code quality can erode and test smells can develop, such as the occurrence of overly general fixtures, obscure in-line code and dead fields. Test smells are poor solutions to recurring implementation and design problems in test code. Until now, no support has been made available to developers during the analysis and adjustment of test fixtures.
To address this shortcoming, we developed a TestHound. TestHound automatically analyzes test fixtures to detect fixture-related smells and guides improvement activities.

Publication
More details on TestHound can be found in the associated publication.
Automated Detection of Test Fixture Strategies and Smells
Michaela Greiler, Arie van Deursen, Margaret-Anne Storey
Proceedings of the International Conference on Software Testing, Verification and Validation, pages xxx-xxx.
IEEE, Luxembourg, March 2013.

Dr. Michaela Greiler

I make code reviews your superpower.

Leave a Reply

Your email address will not be published. Required fields are marked *