JCrasher: Old versions

The current version is at http://code.google.com/p/jcrasher/

All software is provided "as is".

JCrasher Classic: Software--Practice & Experience 2004

The JCrasher Test-Case Planner and JUnit Runtime Extension

Junit-ReInit--Our Fast-But-Maybe-Incorrect JUnit with Fewer Side-Effects Between Test-Cases

JUnit-MultiCL--Our Slow-But-Correct Alternative to Junit-ReInit

Using JCrasher without Eclipse

The following assumes that you have already installed Java version >= 1.4.
  1. Make sure that the following are all reachable via your classpath:
  2. Compile your subject classes like
    javac P1.java
  3. Run the JCrasher Application, pass it the qualified class-name for each class you want to test, separated by blank--for example, P1:
    java edu.gatech.cc.jcrasher.JCrasher P1
    JCrasher puts generated test classes in the same folder where it has found the class file under test. So now we should have P1Test.java and at least P1Test1.java. If JCrasher has found the class under test in a jar then the test classes are put in a new package-style directory relative to your current working directory.
  4. Compile the testfiles like
    javac P1Test.java
  5. Run the generated sources via our modified JUnit like
    java edu.gatech.cc.jcrasher.junit.textui.RaGTestRunner P1Test

Using JCrasher as an Eclipse 2 plug-in

To provide a common case example, the following assumes that you are running Windows and have already installed Eclipse in c:\Program Files\Eclipse
  1. Download and unpack jcrasher_0.1.9_eclipse.zip.
  2. Move the content (=the directory cc.jcrasher_X.Y.Z) to
    c:\Program Files\Eclipse\plugins
    Double-check that you now have the following files
  3. Start Eclipse and include both the JUnit and the JCrasher libraries in the projects, in which you want to use JCrasher
  4. Select any set of top-level Java types of one of the projects you have prepared above, right click, JCrasher: Generate JUnit TestCase.
  5. Figure 1. JCrasher invoked as an Eclipse plug-in.

    Figure 1. Invoking JCrasher conveniently as an Eclipse plug-in.

  6. JCrasher puts generated test classes in the same directory in which it has found the class files under test. So if you have configured your project to use different directories for source and class output, then you might want to add the project output directory to the project's source directories:
    Select the project, right click, Properties, Java Build Path, Source, Add existing folder, probably bin if you have not modified the default output location. If JCrasher has found the class under test in a jar then the test classes are put in a new package-style directory relative to your current working directory.
  7. Select one of the created test classes and run its test-cases with JUnit--for example, with the JUnit library integrated into Eclipse or with our JUnit-ReInit as follows
    1. Download the above junit-reinit jar file and save it to c:\Program Files, for example.
    2. Start Eclipse and include the JUnit-ReInit library in the projects, in which you want to use it:
      Select the project, right click, Properties, Java Build Path, Libraries, Add External Jars...
    3. From Eclipse's project tree select the junit-reinit jar file and start its edu.gatech.cc.jcrasher.junit.textui.RaGTestRunner.
  8. Keep the bar green..

JCrasher 0.8

The following is an example setup: See the included changes.txt for details about changes and improvements.

Requirements