This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

TDD or BDD and GWT?

Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic