2

So I managed to create a GWT-SpringMVC setup. Wasn't easy (not too many resources), but possible. I even autowired and stuff. It even works :)

However, I can't figure out how to make the GwtTestCase run. Obviously it needs the "server" to be up, and because I use Spring, it needs to pass through the dispatching servlet (no?). But I can't figure out how to connect the two. In production or hosted mode, I got the web.xml and the spring-servlet.xml to configure these things. What can I do for tests?

I thought of ignoring the web part and testing the service directly - but this will deny me the option to automatically tests that everything is "transferable". (if you have an idea on how to do that, I might ditch the GWTTestCase altogether).

skaffman
  • 398,947
  • 96
  • 818
  • 769
Ran Biron
  • 6,317
  • 5
  • 37
  • 67
  • Your basic assumptions are incorrect - `GwtTestCase` dos not require the server to be up at all; it's for writing unit tests. – skaffman Jul 07 '11 at 19:11
  • @skaffman: I thought that GWTTestCase worked on the javascript level. How can I check that if the server is down? – Ran Biron Jul 07 '11 at 20:36
  • Because javascript has nothing to do with the server. `GwtTestCase` starts up a headless browser engine and runs the JS inside of that. The server is entirely irrelevant. – skaffman Jul 07 '11 at 20:50
  • @skaffman: so how can I check that my client/server integration is working? that all of my "shared" classes are "transferable"? – Ran Biron Jul 10 '11 at 08:26

1 Answers1

1

An alternative to GWTTestCase could be the gwt-test-utils framework, which provides a simple integration with Spring (see here for details)

Gael
  • 151
  • 5