Saturday, 22 March 2008


This information is out of date - please see

Version 0.4 of the grails selenium plugin is now available.

This version adds:

  • scripts to create and run tests

  • a postResults url for displaying the final test results

Details are as follows:

Runs Selenium in the specified browser.
Specify the path to your browser as a command line parameter i.e.
grails run-selenium /usr/bin/firefox

or, if the executable is on the path you would just need
grails run-selenium firefox

In your, you can specify:
selenium.resultsUrl=/your/url/here (defaults to ${appContext}/selenium/postResults)

See (section titled Continuous Integration) for more information on selenium and continuous integration.
Generates a new empty selenium test.

Supply the path of the test you want to create, relative to 'web-app/selenium/tests'. The extension of this must be one of html, psv, gsp. The test file will be created using the syntax based on the file extension.

Example use:
grails create-selenium-test registration/errors/InvalidUsername.gsp


Generates a new selenium test for the given domain class.

Supply the name of the domain class you want to test, followed by and extension that identifies the sytax to use. The extension of this must be one of html, psv, gsp.

Example use:
grails create-selenium-domain-test book.gsp


The generated test exercises the default grails scaffolding for CRUD functionality.

postResults page
A basic postResults page is provided, and if required the results can be saved to xml.

When using grails run-selenium, you can add properties to


  • selenium.resultsUrl=/your/url/here (defaults to ${appContext}/selenium/postResults)

  • selenium.saveXmlTo=/tmp/selenium.xml

By default resultsUrl is set as  ${appContext}/selenium/postResults which is provided as a basic HTML implementation. Nothing fancy.

Download here or install with
grails install-plugin