We probably we go with Selenium. Someone else (other than me) will evaluate that.
I look at MVP + JRE based testing/mocking and I have trouble seeing the value. All of our algorithms and database interactions are pojos and we have tons of JUnit tests written (without MVP + JRE tests/mocks). I ask myself if there is much value in doing MVP + JRE based tests/mocks when Selenium will exercise those same areas. Why do double the work? Maybe I don't understand something or need to get used to the idea. Then I ask myself why do MVP if not doing the MVP+JRE tests/mocks? Yes, it makes the code cleaner, separating business logic from display. Is that enough? On Thursday, June 14, 2012 2:37:05 AM UTC-7, Thomas Broyer wrote: > > > > 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/-/jomcMl99q_wJ. 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.
