docs: document JUnit 5 parameterized test configuration for Gradle#63
Open
jimisola wants to merge 1 commit into
Open
docs: document JUnit 5 parameterized test configuration for Gradle#63jimisola wants to merge 1 commit into
jimisola wants to merge 1 commit into
Conversation
Gradle's JUnit XML reporter writes display-name-only test case names
([N] args) that omit the method name, preventing reqstool from linking
parameterized test results to @SVCs-annotated methods.
Document the one-line fix (systemProperty on tasks.withType(Test)) and
note the limitation for explicit name="{index}..." annotations.
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
systemPropertyconfiguration that enables reqstool to track JUnit 5 parameterized test results per methodREADME.mdanddocs/modules/ROOT/pages/configuration.adocname=limitationBackground
Gradle's JUnit XML reporter writes display-name-only test case names (e.g.
[1] ACTIVE) that omit the method name. Reqstool uses the method name to link test results to@SVCs-annotated methods — without it, parameterized test results are skipped with a warning. AddingsystemProperty 'junit.jupiter.params.displayname.default', '{displayName}[{index}]'to allTesttasks fixes this by producing names likecheckStatus(StatusType)[1].Maven Surefire is unaffected — it always embeds the method name.
Related
Test plan
tasks.withType(Test).configureEach { systemProperty 'junit.jupiter.params.displayname.default', '{displayName}[{index}]' }to a Gradle project with@ParameterizedTestmethods annotated with@SVCsgradle buildbuild/test-results/**/*.xml— parameterized test case names should start with the method name (e.g.checkStatus(StatusType)[1])reqstool status— parameterized test methods should now show as PASSED/FAILED rather than missing