Test driven development for GWT UI code with asynchronous RPC
Tuesday, April 22nd, 2008In my previous blog post I we saw a test-driven approach to GWT UI code. This was based on moving logic to a Supervising Controller.
In this follow-up post we’ll turn our attention to interacting with RPC, and see how this can be tested using EasyMock. This involves some tricks and non-trivial boilerplate code, but fortunately most of this can be hidden by introducing convenience methods, and we end up with tests that are expressive and easy to read.
This article continuous on the sample code in my previous blog post, but if you’re just interested in the RPC part you can probably skip that and start from here. Familiarity with EasyMock basics is assumed.