>
> 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.  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'm considering if the technique described above could be an alternative to 
many Selenium tests.  It still allows testing in Java (even though it uses 
GWTTestCase).  As a Java programmer, that is very desirable.  Think of how 
easy it would be test a query driven case.  With Java/GWTTestCase the test 
case can drive the query (almost like scripting a view), exercise all the 
mechanics of the query (including the GWT-RPC), and easily check the 
results.  Essentially, all the layers of software are tested.  The only 
thing left out is the actual data entry by the user.

A good point made in the video you mentioned is Google follows a 70/20/10 
rule.  70% of test are micro tests that run quickly and involve no network 
traffice.  10% are big tests, largely GWTTestCase tests.  I guess I'm 
looking at the latter.  These are tests that run by QA to verify the 
product.  Being based on GWTTestCase (and it's being slow) is not that big 
of a deal, if it works better than Selenium.

-- 
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/-/y9uGaRn0IGYJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to