aspose file tools*
The moose likes GWT and the fly likes TDD or BDD and GWT? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "TDD or BDD and GWT?" Watch "TDD or BDD and GWT?" New topic
Author

TDD or BDD and GWT?

J. B. Rainsberger
author
Ranch Hand

Joined: Aug 05, 2004
Posts: 87
Hello, there. I have only seen a little of GWT, and am intrigued by the notion of being able to test-drive Javascript with JUnit. Are the authors TDD or BDD practitioners? What practical advice or warnings do they have about trying to test-drive GWT applications?


Author of <a href="http://www.amazon.com/exec/obidos/ASIN/1932394230/ref=jranch-20" target="_blank" rel="nofollow">JUnit Recipes: Practical Methods for Programmer Testing</a>
Robert Hanson
author
Ranch Hand

Joined: May 11, 2007
Posts: 34
Hi J. B.,

I am a believer in TDD, but as a practitioner I tend to slip sometimes. When it comes to GWT I tend to slip more than usual. ...But I am working on it.

As for test-driving, I assume you mean the JUnit support in GWT? I will say that it isn't as smooth a ride as I would like. First you need to use only those classes that you can use in a normal GWT app (read limited JRE and Java 1.4 syntax), because the test case, like the GWT app code, will be compiled to JS for testing. Second there is no support for suites.

On the flip side, the one thing I really like about it is the ability to test the RPC calls between the client and server. When running the tests GWT starts up a light-weight Tomcat instance for your server-side code, then in the test you can call your client code to trigger AJAX-style RPC calls against the server. I don't know of any JS tool that will let you do that.

I think that the JUnit support is great, but it could be better.


Robert Hanson
Co-Author GWT in Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: TDD or BDD and GWT?
 
Similar Threads
Clean Code: TDD and BDD
BDD Vs FDD/TDD
How Agile Testing work with QA Teams?
BDD versus TDD
BDD with JUnit