Writing Selenium Tests
Selenium tests should be placed under the
test/selenium directory. As with other test types you can use packages to group your tests if
you wish.
You should not extend any of the base test classes in the Selenium API such as
SeleneseTestCase
or GroovySeleneseTestCase
as these tests will attempt to create a separate Selenium instance (and open another browser window) for every single
test! The plugin starts a Selenium instance for you when grails test-app runs the functional test phase. Your tests
simply need to connect to that running Selenium instance.
There are several options available for writing Selenium tests:
- Using The SeleniumTest Mixin
- Extending GrailsSeleniumTestCase
- Using The Page Object Pattern
You are not limited to writing Selenium tests as JUnit test cases.
- Using Other Testing Frameworks