Search the web
Sign In
New User? Sign Up
TestFirstUserInterfaces
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Test-driving ASP.NET   Message List  
Reply | Forward Message #1004 of 1052 |
Re: GWT and Fit (Was: Test-driving ASP.NET)

GWT code looks like regular Java code except in a few conditions: it
can inline native JavaScript within your Java source, or it can use a
compile-time deferred binding technique to pick code based on your
browser type (Firefox, IE, etc.). You can write regular Java JUnit or
Fit tests for your application, but as soon as your code invokes
Javascript (instantiating any widget does this) or uses the deferred
binding, you need to run your code in a browser.

GWT ships with a modified browser that can essentially run your GWT
Java code in a JVM instead of JavaScript. Whenever you need to test
code that needs a browser, Google provides an extension to TestCase
called GWTTestCase. This class essentially starts up a hidden web
browser and runs your test case in this browser -- as Java or
Javascript. This works very well, but it is very slow - it takes
several seconds to run a test as opposed to milliseconds.

For my project, I've used JUnit tests with JMock for the presenter
layers above the UI, and when I really wanted to test actual widget or
JavaScript code (JSON parsing is another case that needs a browser),
used GWTTestCase. I haven't used Fit tests, but I think some folks on
the GWT mailing list may have; the only issue would be getting that
headless browser up when your code required it.

Dan

--- In TestFirstUserInterfaces@yahoogroups.com, Rick Mugridge
<rick@...> wrote:
>
> Hi Dan,
>
> No, I haven't, but I've been keen to try out GWT for some time. I
really
> like the way they manage Javascript. I've been waiting for the widget
> set to become more comprehensive - perhaps it is now?
>
> Now that you mention it, I can see that hooking into the Java-based
> browser runtime is the interesting bit. Is the source available for
> that? Is there a useful testing api?
>
> How have you approached it yourself?
>
> Cheers, Rick
>
> Daniel Wellman wrote:
> >
> > Hi Rick,
> >
> > Have you written Fit tests for GWT? If so, did your tests require one
> > of the fake hosted mode browsers to run to handle widgets or deferred
> > binding?
> >
> > I'm working on a GWT project right now and am interested to share
> > experience stories with other folks.
> >
> > Cheers,
> > Dan
> >
> > --- In TestFirstUserInterfaces@yahoogroups.com
> > <mailto:TestFirstUserInterfaces%40yahoogroups.com>, Rick Mugridge
> > <rick@> wrote:
> > > PS, if GWT was used, the Java code intended for translation to
> > > Javascript could be tested with Fit
> >
> >
>
>
> [Non-text portions of this message have been removed]
>





Thu Nov 8, 2007 12:06 pm

etl_dan
Offline Offline
Send Email Send Email

Forward
Message #1004 of 1052 |
Expand Messages Author Sort by Date

On the agile-testing list, I've been gathering info WRT acceptance tests for this and comparing WatiR, WatiN, Selenium, etc... So now I've noticed that our...
Rob Park
rpark68
Offline Send Email
Nov 7, 2007
7:38 pm

Hi Rob, ... Yes, UI tests are very slow, whether it's web-based or GUI. That's one of the big problems with them. Sometimes you're forced to decide on timeout...
Rick Mugridge
rickmugridge
Offline Send Email
Nov 7, 2007
8:53 pm

Thanks! .rob. ... [Non-text portions of this message have been removed]...
Rob Park
rpark68
Offline Send Email
Nov 7, 2007
9:55 pm

Hi Rick, Have you written Fit tests for GWT? If so, did your tests require one of the fake hosted mode browsers to run to handle widgets or deferred binding? ...
Daniel Wellman
etl_dan
Offline Send Email
Nov 8, 2007
4:20 am

Hi Dan, No, I haven't, but I've been keen to try out GWT for some time. I really like the way they manage Javascript. I've been waiting for the widget set to...
Rick Mugridge
rickmugridge
Offline Send Email
Nov 8, 2007
8:50 am

GWT code looks like regular Java code except in a few conditions: it can inline native JavaScript within your Java source, or it can use a compile-time...
Daniel Wellman
etl_dan
Offline Send Email
Nov 8, 2007
1:38 pm

Hi, Please try WebAii from www.artoftest.com I have used it and it is really good.It can be run inside the NUnit framework,supports AJAX testing. And it can be...
ketan kalia
ketan_kalia
Offline Send Email
Nov 8, 2007
7:30 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help