Open mcwhitak opened 8 months ago
Had closed this as it seems antithetical to a lot of what Micronaut generally mentions around separating unit and functional tests, however the feature would still be greatly appreciated so hoping the team will chime in.
Feature description
Currently the test-resources plugin configures all Test type tasks in a project to include test-resources support.
With newer versions of Gradle (7.3+?) the JVM Test Suite plugin (included by default with the Java plugin now) encourages users to segment their testing/runner/scope needs into different sourceSets and task executions.
This allows for easily running quicker unit tests separately from integration tests as well as isolating heavier framework dependencies.
For projects leveraging this structure, they may not need the test-resources to run during the default
test
task and instead only need them when running their configured test-suite (integrationTest for example).Support configuring specific test tasks that should have test resources enabled. Keep the default behavior of adding it to all test tasks for backwards compatibility.
EDIT: This may also have a usage for specifying (separately) a list of Exec tasks to cover as there are use cases (running Gradle exec tasks as a form of scheduled task execution) where the test-resources server may not be desired there as well.