Question


I am developing with GWT since a few months. I have difficulties with testing. I am using MVP pattern and activities and places. I test the classes without any GWT specific code with Junit. But the client classes with lots of GWT dependencies are difficult to test.

Which stratgy and tools would you recommend?

Était-ce utile?

La solution

Most presenters (from MVP) should be testable without GWT-specific dependencies.

For more complex cases, the approach taken by Apache (ex-Google) Wave seems like the best to me: they created MVP down to very small components such as toolbar buttons. This means a lot of boilerplate as you'll have (at a minimum) a view interface and an implementation class (but that's because of Java), but it's worth it if your scenarios are "complex enough".

Have a look at http://www.google.com/events/io/2010/sessions/gwt-continuous-build-testing.html for some concrete examples.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top