junitCreator

Generates a JUnit test and scripts for testing in both hosted mode and web mode.

junitCreator -junit pathToJUnitJar [-eclipse projectName] [-out dir] [-overwrite] [-ignore] className

-junitSpecify the path to your junit.jar (required)
-moduleSpecify name of the application module to use (required)
-eclipseCreates a debug launch configuration for the named eclipse project
-outThe directory to write output files into (defaults to current)
-overwriteOverwrite any existing files
-ignoreIgnore any existing files; do not overwrite
classNameThe fully-qualified name of the test class to create

Example

 ~/Foo> junitCreator -junit /opt/eclipse/plugins/org.junit_3.8.1/junit.jar
        -module com.example.foo.Foo
        -eclipse Foo com.example.foo.client.FooTest
 Created directory test/com/example/foo/test
 Created file test/com/example/foo/client/FooTest.java
 Created file FooTest-hosted.launch
 Created file FooTest-web.launch
 Created file FooTest-hosted
 Created file FooTest-web
Running FooTest-hosted tests as Java bytecode in a JVM. FooTest-web tests as compiled JavaScript. The launch configurations do the same thing in Eclipse.