This is a proof of concept for adding a separate location for functional tests.
Creates Gradle functional test implementation so that you can keep functional tests (i.e. tests that don't roll back) separate from integration tests that do roll back.
This delineation is a bit arbitrary, but helps keep different kinds of tests separate. This separation was available in Grails 2.
Just run unit and integration tests normally.
For functional tests, use the functionalTest Gradle task. All options should work like other Gradle test tasks:
./gradlew functionalTest
-
Functional test code should go into the src/functional-test/groovy directory.
-
The GebConfig.groovy file gets moved to src/functional-test/resources.
-
Removes the Grails Geb plugin and uses Geb directly. This way we can upgrade / tweak Geb independent of Grails itself.
-
In the build.gradle file, we move Geb and associated libraries to the functionalTest scope so that the Geb, Selenium, and supporting libraries are separate from our regular integration tests.