On Thursday, June 14, 2012 6:19:23 AM UTC+2, Mike Dee wrote:
>
> Have a look at 
>> http://www.google.com/events/io/2010/sessions/gwt-continuous-build-testing.html
>> The Wave guys came up with a model where the presenter controls the view, 
>> so there's no getter; the view calls the presenter back with the values 
>> when needed (i.e. your find() method would have the firstname et al. as 
>> arguments).
>>
>
> Useful, thanks.  I think we are doing something along those lines, but I'm 
> not sure we'll stick with.  Still experimenting with testing.
>  
>
>>
>> Then a GWTTestCase could be written to call all the setters (which fill 
>>> in the form fields) and press the Find button (need to add a method to 
>>> simulate the pressing of the Find button).
>>>
>>
>> If you assume Google tested the widgets, why are you using a GWTTestCase? 
>> Mock the view and use a standard JUnit test case, it'll run so much faster! 
>>
>
> Your question brings up an issue I struggle with.  I understand the 
> benefits of MVP in terms of testing.  However, I want to test the back-end 
> simultaneously, including GWT-RPC and data queries.  As a result, I think 
> GWTTestCase is needed.
>

In that case yes, either GWTTestCase or Selenium/WebDriver tests.
But using GWTTestCase you can still create a mock view if it makes things 
easier for you (though I must admit I'd use a mock RPC too in this case, 
and testing "data queries" separately from GWT); otherwise I think you'd 
have better results with Selenium/WebDriver (see below though).
 

> You may be correct, Selenium is the better way to do that.  I haven't 
> tried Selenium with GWT apps (would be interested in hearing how well and 
> easy it is to work with in terms of GWT).  I've heard it can be difficult, 
> particularly with GWT apps.
>

I haven't used Selenium/WebDriver either.
The key is to use ensureDebugId on your widgets, and run your tests against 
an app compiled with the com.google.gwt.debug.Debug module (so that 
ensureDebugId is not a no-op).

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/7H9G_T5sGN0J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to