Saturday, January 28, 2017

Grails Selenium RC Plugin Released

Grails Selenium RC Plugin Released


Ive finally got the first release of the Selenium RC plugin out of the door. Just run grails install-plugin selenium-rc to install.

For anyone unfamiliar with Selenium RC basically the plugin allows you to write and run Selenium tests in Groovy to functionally test Grails apps using a real browser. The tests run in the functional phase using grails test-app or grails test-app -functional.

In terms of compatibility there is a very minor issue with Safari and some slightly more annoying ones with IE - all of which the plugins default configuration will work around for you. Unfortunately Firefox 3.5 on OSX Snow Leopard doesnt want to play at all due to an open Selenium bug. Firefox on other platforms, Google Chrome and Opera all appear to be 100% compatible.

Ive tried to make writing the tests themselves as similar to regular Grails unit and integration testing as possible. Not only that, if you have the Spock plugin installed you can write your Selenium tests as Spock Specifications.

Documentation is here, source code is on GitHub and issues and feature requests can be raised on Codehaus JIRA. Ive got plenty of things to work on for future releases such as Selenium Grid integration and automatic screen-grabbing when assertions fail.

Available link for download