dimanche 4 janvier 2015

Testing GWT and GAE

I have a GAE app that uses GWT in the front-end.


I want to know if there is a way to test the app for GWT RequestBuilder calls to the Restlet RESTful service that GAE provides


If yes, what is the simplest way to do this.


Calls like this are the ones I need to test:



RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, url);
try{
builder.setHeader("content-type", "application/json");
builder.sendRequest(jsonObject, new RequestCallback() {
public void onResponseReceived(Request request, Response response) {
// Test
}
public void onError(Request request, Throwable throwable) {
// Test
}
});
} catch (RequestException e){
callback.failure(new Throwable(e.getMessage()));
}


What are the best practices in testing REST calls from GWT to GAE?


Aucun commentaire:

Enregistrer un commentaire