Jester is a Java micro Unit-Testing framework
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



Jester is a Java micro Unit-Testing framework. I hate JUnit. It's too large and bloated for simple cases. Furthermore, it's poorly documented (in terms of usage and installation). I wanted a drop-in Unit-Testing framework that the most novice Java developers could use without thinking.


I'm sure that JUnit (or other frameworks) are more efficient. If you're writing code where testing time plays a major factor, then you probably shouldn't be using Jester. That being said, if you want to fork and submit a speed enhancement patch, I'll mostly likely accept.

This is still in early development. Most is undocumented at the moment, but eventually it will be. I promise.

It's currently just source. Eventually it will be a package.


For now, just clone and create your own package. I have yet to package Jester.


  • Create a public class named [Model]Tester
public class PersonTester { ... }
  • Extend TestSuite
public class PersonTester extends TestSuite { ... }
  • Add the main(String args[]) method
public static void main(String args[]) {
  // this must match the name of the current class
  runTests(new PersonTester());
  • Write tests! For a full list of methods and documentation, see the Wiki.


Jester does not execute tests as you might expect!

public testSomething() {
  MyObject obj = ...;
  ArrayList<Thing> things = ...;

  for(thing : things) {
    assertEqual(things, obj, "getThings");

This will fail because those tests are not run until call to runTests. As such, obj.things will only hold the most recent value. You, instead, must create another object to pass as a reference (or just clone it):

public testSomething() {
  MyObject obj = ...;
  ArrayList<Thing> things = ...;

  for(thing : things) {
    MyObject temp = obj.clone();
    assertEqual(things, temp, "getThings");


  • Super simple setup (see above)
  • Suppresses output from tested classes (great if testing other people's code)
  • Simple class methods (assert*) make a great DSL
  • Highly extensible (just create a new class that implements Tester)
  • Setup/TearDown methods