Copyright (2000-2003) Ivan Moore.
Many thanks for all the questions and feedback that have resulted in this documentation, it's much appreciated. (FAQ to be merged into here some time.)
A) For the current version of Jester, you need to have everything on the static CLASSPATH. It's a real nuisance and it'll be fixed some time, but for the moment just put everything on the static CLASSPATH - e.g. 'set classpath=%classpath%;allMyLibs.jar;myBinDirectory'
A) Make sure javac is on the PATH - the standard JDK Windows installers add java but not javac to the PATH.
A) Jester's mutations are very simple text search and replace. If you have some code that Jester mutates in such a way that it no longer compiles, Jester will usually keep going, reverting the mutation that caused the compilation failure and carrying on. If Jester fails for some reason because of a particular bit of code, you can get Jester to ignore that bit of code by putting a comment //stopJesting before and //resumeJesting after that bit of code.
A) Your mileage may vary, but generally the time to recompile the modified source code will be a significant proportion of the overall time to run Jester. Therefore, an easy way to make running Jester faster is to use a faster compiler than Sun’s “javac”. A well known fast compiler is “Jikes” from IBM (see http://www.jikes.org). To use Jikes instead of javac:
make sure the PATH and CLASSPATH are set up correctly for running Jikes.
edit the file "jester.cfg" in the Jester installation directory, changing the line "compilationCommand=javac" to "compilationCommand=jikes".
Running Jester on itself (by making a copy of Jester under a different package – you can’t normally run Jester on itself), using javac took 6 mins and using Jikes took 2 mins (on my machine; again, your mileage may vary).
A) Use standard optimization techniques such as inspecting the code with a profiler and eliminating redundant code in the unit tests.
A) Make sure you aren't mutating comments.
A) Make sure you aren't mutating untested code such as samples and the tests themselves.
A) Make sure the most expensive tests (e.g. ones that do I/O) show up later in the test suite. You want Jester to try the cheapest (fastest) tests first. If they fail, it doesn't run the more expensive tests because Jester stops running the tests as soon as any fail (it knows that the mutation has been caught by at least one test, which is all Jester is interested in).
A) Simple – just delete the source for all the files that you don’t want to test (without deleting the corresponding class files).
A) Again, the compilation command can be changed:
make sure that the PATH is set up correctly for running Ant.
edit the file "jester.cfg" in the Jester installation directory, changing the line "compilationCommand=javac" to "compilationCommand=comp.bat".
Make a file, "comp.bat" that simply contains the text "ant" (or whatever you need to run to have your code recompiled, e.g. specifying a particular ant target). When Jester tries to recompile the source that it has just modified, it will try to "exec" "comp.bat FILENAME" where FILENAME is the source file just modified. By having this be an executable file that itself runs Ant, the FILENAME is ignored and Ant recompiles whatever needs to be recompiled (it doesn't need to be told what file just changed).
NOTE I haven't tried this on Unix - instructions to follow.