Sunday, October 17, 2010

Re: newbie - unit test (solved)

At 06:08 PM 10/16/2010, you wrote:


>On 16 oct, 23:25, Ray Tayek <rta...@ca.rr.com> wrote:
> > hi, i added a unit test to the greet example (please see code below). i get
> >
> > ...
> > The development shell servlet received a request for 'greet' in
> > module 'p.R.JUnit.gwt.xml'
> > [WARN] Resource not found: greet; (could a file be missing from
> > the public path or a <servlet> tag misconfigured in module
> p.R.JUnit.gwt.xml ?)
> > ...
>
>JUnit tests do not use your web.xml, so you have to declare your
>servlets in the gwt.xml.
>
>... So if you don't want to include a <servlet> tag in your module, you
>can create a "test module" that inherits your "normal" module and adds
>the <servlet> tag, and return this module's name from your unit test.
>
>The <servlet> tag is documented here:
>http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjects.html#DevGuideModuleXml
>and here http://code.google.com/webtoolkit/doc/latest/DevGuideTesting.html

i added servlet tag like:

<entry-point class='p.client.R'/>
<servlet path='/greet' class='p.server.GreetingServiceImpl'/>

and it works.

thanks


---
co-chair http://ocjug.org/

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate