I am writing a Grails-5 and I am using cucumber for BDD. I've followed the tutorial at: https://www.baeldung.com/java-cucumber-gradle
I can run my unit tests using:
$ ./gradlew check
And I can run my cucumber BDD tests by starting the server in one shell:
$ ./gradlew server:bootRun
And invoking the tests in another:
$ ./gradlew cucumberCli
Is it possible to configure build.gradle in such a way as to have ./gradlew check run the unit tests, then start the server, then run the cucumber tests, and finally bring the server back down?
If at all possible, it would be even better if the cucumber infrastructure could start and stop the server between each test. That way each test would start in a known state.