I was wondering if anyone had tried to configure this testing before
with any success, or if there were alternative suggestions.
Thanks in advance for your help.
Thanks for the reply.
I'd thought about using the XML file to execute the test but was
hoping to try and get it working using the GWTTestCase.
I looked at your link and I've gotten that working for my normal
development. However, for whatever reason when you lauch your
GWTTestCases from the JVM (either using the generated .launch file for
Eclipse or an Ant task) it uses the contained Tomcat instance for the
testing. I thought I would be smart and overwrite the web.xml, but
for whatever reason the tests absolutely will not execute unless the
shell is mapped to /*.
This may just be a limitation that there's no way around, but I wasn't
sure if anyone could offer any pointers.
I think my next step is to dig into GWTTestCase to try and see how
that is put together and if it's modifiable.
Thanks.
On Apr 18, 11:57 am, "George Georgovassilis"
<g.georgovassi...@gmail.com> wrote:
> Hello modnar
>
> You can test your services with an XMLWebApplicationContext, which is the
> same way the gwt-sl unit tests do it and should be sufficient for unit
> testing. I think you are in fact referring to integration testing since you
> want to include your client code into the testing, which is of course far
> better when you want to invest limited time into developing tests.
>
> You might also want to have a look at [1] where a possible solution is
> described.
>
> [1]http://groups.google.com/group/gwt-sl/browse_thread/thread/341ea2873a...
Basically if you pay attention when your GWTTestCases are executed a /
tomcat directory is created. Inside that directory is this structure
/tomcat
/tomcat/webapps
/tomcat/webapps/ROOT
/tomcat/webapps/ROOT/WEB-INF
/tomcat/webapps/ROOT/WEB-INF/web.xml
That web.xml file contains a mapping of GWTShell to /*.
To get this to work you should:
1) Move the /ROOT directory to /shell
2) Add in your own web.xml and servlet.xml file to /ROOT/WEB-INF
3) Change your getModuleName() call in your GWTTestCase to be /shell/
<MODULE NAME>
This sounds kinda messy and it is, but by configuring all of this in
ANT tasks I was able to get it to work so that I can now perform these
integration tests.
On Apr 20, 1:37 pm, modnar <j...@modnar.net> wrote:
> George
>
> Thanks for the reply.
>
> I'd thought about using the XML file to execute thetestbut was
> hoping to try and get it working using the GWTTestCase.
>
> I looked at your link and I've gotten that working for my normal
> development. However, for whatever reason when you lauch your
> GWTTestCases from the JVM (either using the generated .launch file for
> Eclipse or anAnttask) it uses the contained Tomcat instance for the
> testing. I thought I would be smart and overwrite the web.xml, but
> for whatever reason the tests absolutely will not execute unless the
> shell is mapped to /*.
>
> This may just be a limitation that there's no way around, but I wasn't
> sure if anyone could offer any pointers.
>
> I think my next step is to dig into GWTTestCase to try and see how
> that is put together and if it's modifiable.
>
> Thanks.
>
> On Apr 18, 11:57 am, "George Georgovassilis"
>
> <g.georgovassi...@gmail.com> wrote:
> > Hello modnar
>
> > You cantestyour services with an XMLWebApplicationContext, which is the
> > same way thegwt-sl unit tests do it and should be sufficient for unit
> > testing. I think you are in fact referring to integration testing since you
> > want to include your client code into the testing, which is of course far
> > better when you want to invest limited time into developing tests.
>
> > You might also want to have a look at [1] where a possible solution is
> > described.
>
> > [1]http://groups.google.com/group/gwt-sl/browse_thread/thread/341ea2873a...
>
> > On 4/18/07, modnar <j...@modnar.net> wrote:
>
> > > I have an application which utilizes theGWTHandler. I would like to
> > > be able to use JUnit totestthese services to ensure that they are