Open jasonab opened 1 month ago
This issue needs a decision from the team responsible for that area. They have been informed. Response time may vary.
This feels like it might be more than a documentation issue in case new APIs are required to support the use-case described here.
We currently do not expose test framework options at the top level of a test suite, but this is something we intend to do somehow. Currently, the only way to achieve this is by configuring the task directly.
My interpretation of test suite theory is that, instead of using tags, I should split my tests into different suites (based on how I used tags). This is fine, but I wish you guys would tell me that! All I really want is a straight answer for when I Google how to migrate my tagged tests, but that straight answer does not seem to exist in the Gradle documentation.
Issue type
Wrong or misleading information
Problem description
In pre-test suite Gradle code, you could configure JUnit options in a closure under
useJUnitPlatform
, e.g.However, with test suites (and
useJUnitJupiter()
), there is no closure under the JUnit configuration call. Instead, you have to declare anoptions
block inside of thetestTask
, cast theoptions
variable toJUnitPlatformOptions
manually, and callexcludeTags
on that object. Ignoring the lack of type-safe code here, this approach is not documented anywhere in the test suite documentation, leaving people to guess based onTestNGOptions
and extrapolate from there. The documentation should clearly show how to do common JUnit tasks, like filtering on tags.Context (optional)
No response
Page with the problem
https://docs.gradle.org/8.9/userguide/jvm_test_suite_plugin.html