As mentioned via email, I think there needs to be a way to get the events to the module under test without having to modify it.
Also, you need a test that verifies this infrastructure works (probably a simple fake module and just verifying it responds to an event as expected). http://gwt-code-reviews.appspot.com/1043801/diff/1/8 File user/src/com/google/gwt/junit/JUnitShell.java (right): http://gwt-code-reviews.appspot.com/1043801/diff/1/8#newcode1536 user/src/com/google/gwt/junit/JUnitShell.java:1536: // TODO: figure out if it is possible to allow multiple modules. On 2010/11/09 19:31:37, kjin wrote:
I'm not sure about it -- E2E tests run for the whole application, so
(to my
limited experience) there's only one module which contains entry
point.
OTOH, I'm experimenting with initializing Module Under Test in test
methods, so
this will be addressed in next pass.
A number of internal GWT apps use multiple modules, each with their own entry points. http://gwt-code-reviews.appspot.com/1043801/diff/14001/15001 File dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java (right): http://gwt-code-reviews.appspot.com/1043801/diff/14001/15001#newcode293 dev/core/src/com/google/gwt/dev/cfg/ModuleDef.java:293: public String[] getAllSourceFiles() { What is this used for? http://gwt-code-reviews.appspot.com/1043801/diff/14001/15006 File user/src/com/google/gwt/junit/JUnitShell.java (right): http://gwt-code-reviews.appspot.com/1043801/diff/14001/15006#newcode151 user/src/com/google/gwt/junit/JUnitShell.java:151: protected interface JUnitShellOptions extends HostedModeOptions, OptionProxyTo {
80 chars
http://gwt-code-reviews.appspot.com/1043801/diff/14001/15006#newcode192 user/src/com/google/gwt/junit/JUnitShell.java:192: return "Proxies non-junithost XHRs to the specified host and port. Implies -startProxy";
80 chars
http://gwt-code-reviews.appspot.com/1043801/diff/14001/15006#newcode317 user/src/com/google/gwt/junit/JUnitShell.java:317: return "Starts a proxy which replaces syntheticModuleName with moduleName as fallback"; This doesn't seem a terribly accurate description. Also, what exactly does this do if a proxy server/host wasn't specified? http://gwt-code-reviews.appspot.com/1043801/diff/14001/15006#newcode327 user/src/com/google/gwt/junit/JUnitShell.java:327: return true; Why does this need to be excluded from -help? http://gwt-code-reviews.appspot.com/1043801/diff/14001/15006#newcode1278 user/src/com/google/gwt/junit/JUnitShell.java:1278: options.setProxyToPort(getPort()); What will this accomplish? Won't the proxy be running on getPort()? http://gwt-code-reviews.appspot.com/1043801/diff/14001/15006#newcode1337 user/src/com/google/gwt/junit/JUnitShell.java:1337: Linker l = module.getActivePrimaryLinker().newInstance(); Use a longer name. http://gwt-code-reviews.appspot.com/1043801/show -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
