Excellent, sounds great. There's a few other things with GWT too: - It needs src/main/java and src/gwt-test/java directories to be included in the class path for testing - There are different testing modes (hosted, web and manual). In the manual case GWT prompts and waits for user interaction (via std out I believe) so that would need to be visible from gradles output. I'm currently still on 0.5.2 and have to run with -d to see anything.
Hopefully these are possible as well. Cheers Andrew 2009/9/24 Adam Murdoch <[email protected]> > > > Andrew Pietsch wrote: > >> Hi there, >> >> I've been slowly writing a plugin for GWT development and have some >> slightly complicated testing requirements which I'm hoping the new test >> function slated for 0.8 will support. My projects use both TestNG (my >> preferred framework) and JUnit (required for testing certain GWT aspects). >> >> My plugin needs to be able to do the following. >> >> 1. Need be able to create two test tasks, one that uses TestNG and one >> that uses JUnit >> 2. Run TestNG tests live in the normal test location (src/test/java, >> src/test/resources) >> 3. Run JUnit tests live under src/gwt-test/java and src/gwt-test/resources >> 4. Run JUnit (forked) with both custom JVM and normal -D args (for the >> GWT bits) >> >> JUnit equivalent example: >> java -XstartOnFirstThread -Xmx256M -Dgwt.args="-out build/reports/gwt" >> -classpath <cp goes here> junit.textui.TestRunner the.class.UnderTest >> >> Will this be possible? >> >> > Absolutely. You would have a couple of options as to how this is > structured. You could add a source set for the junit tests: > > source { > // Adds the source set > gwtTest { > java.srcDir = 'src/gwt-test/java' > resources.srcDir = 'src/gwt-test/resources' > // you probably will need > compileClasspath = ... > runtimeClasspath = ... > } > } > > task gwtTest(type: Test) { > testClassesDir = source.gwtTest.classesDir > classpath = source.gwtTest.runtimeClasspath > // plus the -X, -D options > } > > check.dependsOn gwtTest > > The things you get for free by using a source set: > - compileGwtTest and processGwtTestResources tasks > - the dependencies of the gwtTest task are auto-wired > - checkstyleGwtTest or codenarcGwtTest tasks, if you need them > > The things you don't get for free, but which we might add later: > - the gwtTest test task. > - gwtTestCompile and gwtTestRuntime classpaths wired up to the main classes > or any dependency configurations added > - gradle build won't automatically run the gwtTest task > > > Adam > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > >
