SourceForge.net Logo

Test Harness

Writing tests is fun, as long as the result looks good!

Introduction

You want to write tests, but hesitate because it will all be a bunch of hardly interpretable logprints in the end anyway? The Test Harness is developed to make it easier for us who like full control over testing, but want to be able to give the test environment to someone else to run from time to time. This is achieved by providing a very simple Java-based framework for writing the tests, while still providing a intuitive GUI to present results and manage what tests to run. The simplest test-case looks like this:

import org.dhs.per.apps.harness.*;

public class MyTest extends TestCase {

  public MyTest() {
    super("my-test");
  }

  public void run() {
    // TODO: Run the test here!
  }
  
}
The test-cases are then bundled in test-case folders and loaded into the GUI point-n-click style. And even though the test-cases are written in Java, the multitude of libraries available for that language makes it very easy to write tests to test anything from actual Java-code to SQL-databases or embedded systems. Pretty much every system than can communicate via a Java-compatible interface e.g. sockets, serial etc. can be tested with this harness.

Contents

Download

New! There is now an executable for Win32 available (built using Launch4j), making the distribution of the harness somewhat simpler at those systems.

Version 0.5 at Sourceforge.net


Updated 2006-07-25 by Pär Spjuth