I also defined the dependencies and everything compiles.
Define “the dependencies”.
I have no idea about Cucumber, but from a very short look at their docs, you also need to add io.cucumber:cucumber-junit-platform-engine as runtimeOnly dependency to your test suite so that the test get executed on JUnit Platform.
Be aware, JUnit Platform != JUnit Jupiter.
JUnit Jupiter is on JUnit Platform engine that allows to run JUnit Jupiter (the so to say JUnit 5) tests.
Spock for example is a differend JUnit Platform engine.
And from Cucumber their docs / source it seems you need that dependency which also is a JUnit Platform engine for the tests to be discovered and executed.
If I run the service tests, nothing happens, though
$ ./gradlew --console=plain --no-build-cache :services:flowfx:serviceTest
Configuration on demand is an incubating feature.
> Task :services:flowfx:processResources UP-TO-DATE
> Task :services:flowfx:processServiceTestResources NO-SOURCE
> Task :libs:logger:compileKotlin UP-TO-DATE
> Task :libs:logger:compileJava NO-SOURCE
> Task :libs:logger:processResources UP-TO-DATE
> Task :libs:logger:classes UP-TO-DATE
> Task :libs:logger:jar UP-TO-DATE
> Task :services:flowfx:compileKotlin UP-TO-DATE
> Task :services:flowfx:compileJava UP-TO-DATE
> Task :services:flowfx:classes UP-TO-DATE
> Task :services:flowfx:jar UP-TO-DATE
> Task :services:flowfx:compileServiceTestKotlin UP-TO-DATE
> Task :services:flowfx:compileServiceTestJava NO-SOURCE
> Task :services:flowfx:serviceTestClasses UP-TO-DATE
> Task :services:flowfx:serviceTest UP-TO-DATE
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
BUILD SUCCESSFUL in 5s
9 actionable tasks: 9 up-to-date
The unit tests are also a test suite, and they run just fine, using JUnit Jupiter. The obvious difference is of course JUnit/Cucumber vs JUnit/Jupiter, where the Cucumber tests should get picked up via the @Suite annotation. This is configured so:
So I was wondering if that’s maybe not supported (yet) using the test suite config. Note that they run just fine when the source sets and configurations are setup manually. I’m trying to convert a running setup into a test suite, and the cucumber test just stop working.
Your main problem though was, that you used useJUnit(), which means JUnit 4.
There is unfortunately no useJUnitPlatform() yet for the test suites dsl, only directly on test tasks.
So you either need to do the useJUnitPlatform() on the test task, or use something like useSpock() or useJUnitPlatform() like you did so that it actually uses JUnit Platform and your Cucumber engine can do its work.