Question

i have problems writing an integration-test for the locale-storage in my GWT-Application. Due to the fact that Locale-Storage is "Client"-Side DB, i have problems accessing it through my testing code.

After a bit of research i found maybe a way how to do it:

http://code.google.com/p/gwt-test-utils/

Is this the right way to do it, or should i forget testing this part (would be bad)? If not how can i handle it?

Était-ce utile?

La solution

gwt-test-utils indeed seems to support Storage: https://github.com/gwt-test-utils/gwt-test-utils/blob/master/gwt-test-utils/src/test/java/com/googlecode/gwt/test/StorageTest.java

…or you could just use a GWTTestCase; this is how the feature is tested in GWT itself. GWT 2.6 has upgraded its HtmlUnit dependency which should now support local/session storage (I suppose); otherwise you could launch your tests in a real browser: http://www.gwtproject.org/doc/latest/DevGuideTestingRemoteTesting.html

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