Do you use HttpUnit and if so is in the Eclipse IDE?
 
I've used HttpUnit with some success on a Web Application, but a GWT 
application is different.
 
Rgds
Mike

--- On Fri, 9/25/09, Richard Kennard <[email protected]> wrote:


From: Richard Kennard <[email protected]>
Subject: 'Best practice' for unit testing servlets with init-params?
To: "Google Web Toolkit" <[email protected]>
Date: Friday, September 25, 2009, 4:45 AM



Hi guys,

When unit testing a GWT app that uses servlets, it seems you cannot
use the 'real' servlet definition in your app's web.xml. Instead you
must put a 'servlet' element into your unit test's module.gwt.xml.

However, the module.gwt.xml 'servlet' element is not as capable as the
web.xml 'servlet' element. Specifically, it does not support init-
params.

So what is the 'best practice' for simulating my app's init-params? Is
there a way in module.gwt.xml? Or is there a way in my servlet to
detect I am running as a GWT unit test? Should I subclass my servlet
to make a test version?

Regards,

Richard.




      
--~--~---------~--~----~------------~-------~--~----~
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