Skip to content
Discussion options

You must be logged in to vote

You can use the regular JUnit annotations @DisplayName and @ParameterizedTest. @DisplayName annotation can be used to specify the common part of the test name, while name attribute of @ParameterizedTest can be used to append parameter values to it if needed:

    @ParameterizedTest(name = " — {0}")
    @ValueSource(strings = {"first", "second"})
    @DisplayName("custom name")
    public void testWithParameters(final String parameter) {
    }

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by baev
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants