views:

60

answers:

2

I've got analysis paralysis looking at all the different functional testing options for a new grails (v1.3.4) application. I've looked at

and there must be others. I think some of the criteria that I would use to make a decision include (in no particular order):

  • Likely longevity, active development
  • Can do ajax/javascript
  • Support for PageObject or similar patterns
  • Maturity
  • Headless (eg htmlunit) is ok, especially if it makes things go faster
  • Good reporting
  • Support for NTLM credential provider or similar
  • Compact, robust test scripts
  • Takes advantage of groovy language

I would be particularly interested to hear from people who have tried more than one framework. Thanks!

+4  A: 

Hi,

I maintain the plugin for WebTest but I'd recommend giving Geb a try. I haven't used it personally on a project yet but I think it will tick off most of your criteria.

It is the most actively developed (IMO) but is quite new. It is built on WebDriver/Selenium so should also be a good fit with your past experience.

WebTest doesn't see a lot of development these days and does not have built in support for page objects. But it does give you great reports. It's downside is it's historical foundation of Ant. It makes it hard to test in a dynamic fashion as your test steps are built up when the test case is executed and then the actual test is run as a second pass.

I have used GFunc as well but the lack of reporting is a real pain and it does not get as much development as Geb. It is far more "groovy" than WebTest though and is a thin wrapper over HtmlUnit allowing you to "roll your own" testing functionality quite easily.

cheers

Lee

leebutts
Lee - thanks for that.
John
+3  A: 

Grails Functional Test is HtmlUnit only. I wouldn't suggest coding directly to HtmlUnit these days with the other frameworks that are available that give you page object and better abstraction out of the box.

I've used the webdriver plugin which seems to work pretty well and has page object built in - but the page object support is coupled to the JUnit hierarchy, which makes it hard for me to use because I want to also use Cucumber.

I'm very excited about Geb and am hearing a lot of success stories with it but haven't gotten to finish setting it up myself.

John Stoneham