On 31 août, 23:48, Gary S <[email protected]> wrote:
> The Plugin's unit testing doc only shows a run 
> configurationhttp://code.google.com/eclipse/docs/gwt_junit.html
>
> It links to a page showing 
> junitCreatorhttp://code.google.com/webtoolkit/doc/1.6/DevGuideTesting.html
>
> I'm missing the part showing to make it work where the test classes
> are under /test instead of /source.
> It isn't clear if it's better to have a separate project for tests or
> a test module within the project.
> If it's a test module within the project what should the setup look
> like
> should source paths be /src and /test ?
> where should junit.jar go ?
> what should the *Test.gwt.xml file look like ?

What I'm doing is:
 1. I'm not using any command line tool (including junitCreator)
 2. I have a "test" source folder in addition to my "src"
 3. I simply put my test classes in the same package as the classes
under test, just within "test" rather than "src"
 4. I do not have *Test.gwt.xml module; my GWTTestCase classes return
the name of the module being tested
 5. as for the JUnit dependency, I've just added the JUnit library
(project's Build Path -> Add library... -> JUnit)

You only need a *Test.gwt.xml module if you have to add some
configurations (<set-property> and the like) to your module under
test, or if you need some servlet (unit tests still use the deprecated
GWTShell, so they don't use your "war" folder and its web.xml, this
means you have to declare your servlets the "old way" using <servlet/>
elements in your module's gwt.xml). Your *Test.gwt.xml in this case
would only <inherit/> the module being tested and add the appropriate
<servlet/> or other needed "configuration tweaks".

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to