Manual-mode tests allow you to run unit tests manually on any browser. In this mode, the JUnitShell
main class runs as usual on a specified GWT module, but instead of
running the test immediately, it prints out a URL and waits for a
browser to connect. You can manually cut and paste this URL into the
browser of your choice, and the unit tests will run in that browser.
For example, if you want to run a test in a single browser, you would use the following arguments:
-runStyle Manual:1
GWT will then show a console message like the following:
Please navigate your browser to this
URL:
http://172.29.212.75:58339/com.google.gwt.user.User.JUnit/junit.html?gwt.codesvr=172.29.212.75:42899
Point your browser to the specified URL, and the test will run. You may be prompted by the GWT Developer Plugin to accept the connection the first time the test is run.
Manual-mode test targets are not generated by the webAppCreator tool, but you can easily create one by copying the test.prod
ant target in the build.xml file to test.manual
and adding -runStyle Manual:1
to the -Dgwt.args
part. Manual mode can also be used for remote browser testing.