You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tibor Digana (Jira)" <ji...@apache.org> on 2020/02/19 15:03:00 UTC

[jira] [Commented] (SUREFIRE-1753) Selectively run/exclude JUnit 5 ParameterizedTest

    [ https://issues.apache.org/jira/browse/SUREFIRE-1753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17040135#comment-17040135 ] 

Tibor Digana commented on SUREFIRE-1753:
----------------------------------------

The [documentation|https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#test]
talks about the JUnit4. You should always check the configuration parameter, as the link above, and see the list of supported providers.
If you want to fix it, feel free to open a PR on GitHub and add a prerequisite into [this page|https://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html] saying that the filter is NOT related to JUnit5. We already mention opposite prereq:
_Since of Surefire Plugin 2.19 you can select multiple methods (JUnit 4, JUnit 4.7+ and TestNG)_ in some chapters.

> Selectively run/exclude JUnit 5 ParameterizedTest
> -------------------------------------------------
>
>                 Key: SUREFIRE-1753
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1753
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: documentation, JUnit 5.x support
>    Affects Versions: 2.22.2, 3.0.0-M4
>            Reporter: Rüdiger zu Dohna
>            Priority: Major
>
> The last two sentences [here|https://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html#Multiple_Formats_in_One] don't work any more with JUnit 5:
> ??The Parameterized JUnit runner describes test methods using an index in brackets, so the non-regex method pattern would become #testMethod[*]. If using the JUnit annotation @Parameters(name="\{index}: fib(\{0})=\{1}") and selecting the index e.g. 5 in pattern, the non-regex method pattern would become #testMethod[5:*].??
> See [this SO question|https://stackoverflow.com/questions/60089306/how-do-i-include-exclude-a-junit-5-parameterizedtest-by-name-in-maven].
> At least the docs should be updated to reflect this limitation to JUnit 4. It would be really nice to have this feature also for JUnit 5, but I've looked into the code a bit and I have the impression that it's not that easy. I didn't find any tests, either.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)