Testslicer?

Testslicer will help decrease the time required for building your application in your continuous integration enviroment. Meaning that Testslicer will only run the tests which were affected by the last changes.

By checking which files changed and instrumenting the java bytecode, it is capable to detect which tests need to run and which can be ignored in the next build.

Results?

By running only affected tests, most builds which were running unit tests between 5-15 minutes had a new build time around 1-3 minutes. The results depends on which classes you changed, of course. Let us know your results by mailing us at our mailing list!

30 secs example

Simply pick effected tests, run them and update timestamps if the tests were sucessfull:

<pick-tests output="result.tests">
        <dirset dir=""> <!-- source code directory to analyze timestamps -->
                <include name="src/main/java"/>
                <include name="src/test/java"/>
        </dirset>
        <fileset refid="unittests.fileset" />
</pick-tests>

<junit fork="yes" forkmode="once" printsummary="true">
        <jvmarg line="-javaagent:testslicer/testslicer-0.9.0.jar"/>

        <classpath>
                <pathelement path="target/classes" />
                <pathelement path="target/test-classes" />
                <pathelement path="testslicer/*.jar" />
        </classpath>

        <batchtest fork="yes" todir="${artifacts.dir}/reports">
                <fileset dir="target/test-classes" includesfile="result.tests"/>
        </batchtest>
</junit>

<update-timestamps>
        <dirset dir="">
                <include name="src/main/java"/>
                <include name="src/test/java"/>
        </dirset>
</update-timestamps>

How does it compare to InfinityTest?

InfinityTest analyzes your bytecode prior to running the tests, therefore all reflection based code will not be analyzed by InfinityTest. Testslicer is also capable of analyzing changes to jsp, velocity and freemarker templates in order to run tests connected to those templates!

As a downside, there is no TestSlicer intellij plugin so far for continuous test running.

Where can I get some help?

You can use the mailing list .

Who is behind Testslicer?

Code is being contributed right now by Caelum Opensource . Project members can be found at the member list page.