Simple Jester - the test tester.

Copyright (2000-2009) Ivan Moore.

Jester finds code that is not covered by tests. Jester makes some change to your code, runs your build (which runs your tests), and if the tests pass Jester displays a message saying what it changed. (This is called "mutation testing"). This version of Jester is a simplification of the “standard” one. The aim for this version of Jester is for it to be much simpler to run.

Jester includes a script for generating web pages that show the changes made that did not cause the tests to fail.

Jester is different than code coverage tools, because it can find code that is executed by the running of tests but not actually tested. However, Jester is not meant as a replacement for code coverage tools, merely as a complementary approach.

Jester is available only under the terms of the license agreement.

This version of Jester has been tried on Windows, using Sun's JDK 1.5. There is absolutely no warranty whatsoever (see license agreement ); it might work on those or other platforms - see the Jester web page for latest known bugs, platforms that it has been tried on, FAQs, etc). Older versions of Jester might work with older versions of Java.

The most important bits are in green, for the impatient.

Installation:

17 mutations survived out of 19 changes. Score = 11
took 0 minutes

Jester has a progress window - the progress bar shows the proportion of source files that have been mutated; the text area shows the most recent mutation that has been made; the progress bar is green if the last mutation caused the tests to fail (i.e. good) and red if the tests still passed despite the mutation (i.e. bad). Note that the progress bar does not show progress while making different mutations to the same file - that is shown by text in the text area changing - because that was simpler to implement.

Usage:

Configuration options

For the following features, edit the file called "jester.cfg" from the installation directory and specify it when running Jester using “-config jester.cfg”. For example, buildPassString=BUILD SUCCESSFUL refers to a line of text in the jester.cfg file.

Configurable mutations

The mutations that Jester applies to the source code are configurable, by editing the file "mutations.cfg" from the installation directory and specify it when running Jester using “-mutations mutations.cfg”. Each line of this file must have a format like:

%if(%if(true || where % can be any single character as a delimiter, and the text if( will be replaced by if(true ||.

This simple scheme of replacing text without parsing has proven adequate so far, but may change in a future version of Jester.

Configurable Ignore List (e.g. for ignoring comments)

Jester can be made to ignore parts of every source file, by editing the ignorelist.cfg file and specify it when running Jester using “-ignore ignorelist.cfg”. This file contains lines starting with a delimiter character that specify regions of the source code to ignore; i.e. regions where it will not try to make a mutation. The first string is where to start ignoring the source and the second is where to stop ignoring the source. For example, to ignore comments in Java code, the ignorelist.cfg file would contain:

%/*%*/
%//%\n

This is not entirely correct but is close enough; e.g. a string "http://jester.sf.net" up to the end of the line would not be considered for mutation by Jester using this ignorelist.cfg file, but that's not so bad. (Note - these are included in the ignorelist.cfg file in the standard build).

This feature can be used by Pester (Jester on Python code) too, e.g. to ignore python comments the ignorelist.cfg file would contain:

%#%\n

Note - the standard build also includes the line %//stopJesting%//resumeJesting so that you can easily tell Jester to ignore parts if a source file if it is causing problems for Jester. i.e. put a comment //stopJesting on the line before the code you want Jester to ignore and //resumeJesting on the line after the code you want Jester to ignore.

Known Problems:

If the code will not compile (either because of classes missing from the class path before Jester tried to compile any classes, or as a result of a change to a source file by Jester) then Jester might hang indefinitely.

NOTE that this version of Jester will not work with any version of Pester, but can be used instead of Pester. This version of Jester is relatively easy to get to work for any language as long as you can give Jester some command to run (to compile if necessary, and run the tests of the code you want to run Jester on) and the source file extension.

Acknowledgements

Very many thanks to:

Support:

Please check the Jester web pages (hosted by sourceforge) for updates and the FAQs, and please enter comments or bug reports on the appropriate pages linked from there.

If it doesn't work

The file "jester.log" (in the directory where you ran jester) shows the commands that Jester has tried to run. In many cases, you can work out what is wrong by trying to run the last command that Jester tried to run. E.g. if the last line of the "jester.log" says "Sat Dec 01 21:46:36 PST 2001 Trying to run command "ant.bat -f test-build.xml"", then try running "ant.bat -f test-build.xml"; this may then reveal the problem. In the case of tests not passing (e.g. the message "Couldn't run test tester because tests didn't pass before any changes made"), try running the tests directly (e.g. "ant.bat -f test-build.xml"). Please delete the file "jester.log" whenever it gets too large, or before running Jester if preferred.


version 1.2-simple
jester@tadmad.co.uk