Thus, you might want to run only certain tests so as you can
focus on checking the modifications you are working on.
GWT build scripts use specific ant tasks and a bunch of system
properties listed in the following table to specify which tests
to run and how.
For instance to run the task test
in the module user
you
have to change to the user
folder and run ant
with the task
as argument, adding any other property with the -D
flag:
$ ( cd user && ant test -Dtest.emma.htmlunit.disable=true ; cd .. )
Module, Task, Property to skip, Description
--------------, ----------------------, ------------------------------, ----------------------
dev, test, test.dev.disable, GWT compiler & dev libraries
codeserver, test, test.codeserver.disable, SuperDevMode server
user, test, test.user.disable, GWT user API and JRE emulation
user, test.nongwt, test.nongwt.disable, Run tests that not require GWTTestCase
user, test.dev.htmlunit, test.dev.htmlunit.disable, Run dev-mode tests with HtmlUnit
user, test.web.htmlunit, test.web.htmlunit.disable, Run web-mode tests with HtmlUnit
user, test.draft.htmlunit, test.draft.htmlunit.disable, Run draft compiled HtmlUnit tests
user, test.nometa.htmlunit, test.nometa.htmlunit.disable, Run -XdisableClassMetadata tests with HtmlUnit
user, test.emma.htmlunit, test.emma.htmlunit.disable, Run emma tests with HtmlUnit
user, test.coverage.htmlunit, test.coverage.htmlunit.disable, Run tests for coverage support
user, test.dev.selenium, test.dev.selenium.disable, Run dev-mode tests using Selenium RC servers
user, test.web.selenium, test.web.selenium.disable, Run web tests using Selenium RC servers
user, test.draft.selenium, test.draft.selenium.disable, Run draft compiled tests using Selenium RC servers
user, test.nometa.selenium, test.nometa.selenium.disable, Run -XdisableClassMetadata tests using Selenium RC servers
user, test.emma.selenium, test.emma.selenium.disable, Run emma tests with Selenium RC servers
requestfactory, test, test.requestfactory.disable, Request Factory library
elemental, test, test.elemental.disable, Elemental library
elemental, test.nongwt, test.nongwt.disable, Run elemental tests that not require GWTTestCase
elemental, test.dev.htmlunit, test.dev.htmlunit.disable, Run elemental dev-mode tests with HtmlUnit
elemental, test.web.htmlunit, test.web.htmlunit.disable, Run elemental web-mode tests with HtmlUnit
tools, test, test.tools.disable, Some tools used in GWT development
Additionally you can utilize some variables to filter which test to run in each task:
Module, Task, Properties, Default
---------------, ---------------------------------------, --------------------------------------, -------------------
dev/core, test, gwt.junit.testcase.dev.core.includes, **/com/google/**/*Test.class
, gwt.junit.testcase.dev.core.excludes, user, test, gwt.junit.testcase.includes, **/*Suite.class
user, test.nongwt, gwt.nongwt.testcase.includes, **/*JreSuite.class
, gwt.nongwt.testcase.excludes, user, test.web.* test.draft.* test.nometa., gwt.junit.testcase.web.includes, **/*Suite.class
, gwt.junit.testcase.web.excludes, **/*JsInteropSuite.class,**/*JreSuite.class,***/OptimizedOnly*
user, test.dev. test.emma.*, gwt.junit.testcase.dev.includes, **/*Suite.class
, gwt.junit.testcase.dev.excludes, **/*JsInteropSuite.class,**/*JreSuite.class,***/OptimizedOnly*