Skip to topic | Skip to bottom


Home

MichaelaGreiler
MichaelaGreiler.TestHoundr1.4 - 06 Oct 2012 - 11:55 - MichaelaGreiler

Start of topic | Skip to actions

TestHound

Smell.jpg

Overview

TestHound is a static analysis tool which analyses test code, detects test smells and guides developers and test engineers during improvement and refactoring of test code.

What TestHound solves

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.

Implementation Details

TestHound is a static analysis tool, implemented in Java and supports languages which compile to Java byte code by using the Apache BCEL library to extract facts. TestHound supports the JUnit and TestNG test frameworks, but can easily be extended to support other frameworks. The results of the analysis are comprised in a hypertext report.

Evaluation

We evaluated the applicability and the usefulness of TestHound with a mixed research approach: we applied TestHound to three case studies, and involved 13 developers in the evaluation (by means of interviews and a questionnaire). The questionnaire used to evaluate TestHound can be downloaded here: Questionaire.pdf

Download

TestHound version 0.1 has been released. Please feel free to download it here: TestHound_v0.1.zip.

Installation

The installation process of TestHound is straight forward:
  • extract the folder TestHound_vX to a location of your choice.
  • Run the jar comprised within the folder.

Quick Start

To run TestHound on your code base you need provide it with three things:
  • with the folder containing your test code (java classes)
  • with a folder containing all dependencies your applications requires to run the tests
  • with a XML file of all the tests you want to analyse (e.g., can be obtained via JUnit)






Edit | Attach | Printable | Raw | More topic actions
Revisions: | r1.6 | > | r1.5 | > | r1.4 | Page history | Backlinks
You are here: MichaelaGreiler > TestHound

to top

Copyright © 2003-2017, Software Engineering Research Group, Delft University of Technology, The Netherlands