What is the needed POM configuration to test a GWT library on top a a GAE Runtime?
Such that when running $mvn install
it will run test for the GWT library.
I am having this idea to test a GWT library (this is not working just my idea):
public class LocalDatastoreTest {
private final LocalServiceTestHelper helper =
new LocalServiceTestHelper(new LocalDatastoreServiceTestConfig());
@Before
public void setUp() {
helper.setUp();
}
@After
public void tearDown() {
helper.tearDown();
}
@Test
public void testGWTLibrary() {
Glimpsecode gcode = new Glipsecode(); // <-- GWT library
gcode.put("testId", "testType", "testJSON", new GlimpsecodeCallback() {
@Override
public void success(Object o) {
// test response object
}
}
@Override
public void failure(Throwable throwable) {
// stuff
}
});
}
}
The GWT library about is working fine in a separate GWT + GAE application (by running mvn gwt:codeserver
then running mvn appengine:devserver
. However to keep things test driven, we need to add testing inside the GWT library.
The GWT library:
- Uses Restlet-GWT to call a RESTlet service (and uses
GWT.create()
internally) - The Restlet service saves the request from GWT (via Restlet-GWT) to the Datastore
How can I test this code? Where it is important that the test will access the localhost GAE, not just a mock test.
Aucun commentaire:
Enregistrer un commentaire