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 2022/03/02 18:41:00 UTC

[jira] [Assigned] (SUREFIRE-1964) Method filtering support on excludes and includes file

     [ https://issues.apache.org/jira/browse/SUREFIRE-1964?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tibor Digana reassigned SUREFIRE-1964:
--------------------------------------

    Assignee: Tibor Digana

> Method filtering support on excludes and includes file
> ------------------------------------------------------
>
>                 Key: SUREFIRE-1964
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1964
>             Project: Maven Surefire
>          Issue Type: New Feature
>          Components: Maven Surefire Plugin
>            Reporter: Ildefonso Montero
>            Assignee: Tibor Digana
>            Priority: Major
>             Fix For: 3.0.0-M6
>
>
> The current code of Maven Surefire plugin does not provide capabilities for performing method filtering on includes/excludes based on files (using surefire.excludesFile or surefire.includesFile params)
> Main idea is to provide the same method filtering capabilities that we can perform nowadays using the -Dtest parameter but on the mentioned resources
> Thus, if we perform {{mvn test -Dsurefire.excludesFile=/foo/bar/file}} and it is using method filtering like:
>  
> {code:java}
> test.SomeTest#test1
> test.SomeTest#test2
> test.SomeTest#test3
> test.SomeTest#test4
> test.SomeTest#test5
> test.SomeTest#test6 {code}
> on a project like: [https://github.com/jglick/simple-maven-project-with-tests] we obtain:
>  
> {{Method filter prohibited in includes|excludes|includesFile|excludesFile parameter}}
> With method filtering enabled on these parameters, we will be able to obtain
> {code:java}
> [INFO] -------------------------------------------------------
> [INFO]  T E S T S
> [INFO] -------------------------------------------------------
> [INFO] Running test.SomeTest
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.035 s - in test.SomeTest
> [INFO] Running test.OtherTest
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s - in test.OtherTest
> [INFO] 
> [INFO] Results:
> [INFO] 
> [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 1.808 s
> [INFO] Finished at: 2021-12-03T18:00:37+01:00
> [INFO] ------------------------------------------------------------------------ {code}
> were test.SomeTest test methods were directly ignored.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)