You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Martin Burger (JIRA)" <ji...@codehaus.org> on 2012/02/15 12:00:03 UTC

[jira] (SUREFIRE-839) If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project

Martin Burger created SUREFIRE-839:
--------------------------------------

             Summary: If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project
                 Key: SUREFIRE-839
                 URL: https://jira.codehaus.org/browse/SUREFIRE-839
             Project: Maven Surefire
          Issue Type: Bug
          Components: Junit 4.7+ (parallel) support
    Affects Versions: 2.12
            Reporter: Martin Burger


In a multi-module project, I configured Surefire to execute tests of a selected JUnit category only. Unfortunately, not all modules contain tests in that category, which makes mvn test fail:

Tests in error: 
  initializationError(org.junit.runner.manipulation.Filter): No tests found matching *foo.junit.categories.SlowTests from org.junit.runner.Request$1@15a

If a module does not contain any test that would match the given category, Surefire should continue instead. Note that specifying -DfailIfNoTests=false does not help in that case.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (SUREFIRE-839) If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/SUREFIRE-839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=315280#comment-315280 ] 

Kristian Rosenvold commented on SUREFIRE-839:
---------------------------------------------

@Andreas; we need a separate jira for that pull request
                
> If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-839
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-839
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Junit 4.7+ (parallel) support
>    Affects Versions: 2.12
>            Reporter: Martin Burger
>            Assignee: Kristian Rosenvold
>             Fix For: 2.13
>
>
> In a multi-module project, I configured Surefire to execute tests of a selected JUnit category only. Unfortunately, not all modules contain tests in that category, which makes mvn test fail:
> Tests in error: 
>   initializationError(org.junit.runner.manipulation.Filter): No tests found matching *foo.junit.categories.SlowTests from org.junit.runner.Request$1@15a
> If a module does not contain any test that would match the given category, Surefire should continue instead. Note that specifying -DfailIfNoTests=false does not help in that case.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (SUREFIRE-839) If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/SUREFIRE-839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=315268#comment-315268 ] 

Kristian Rosenvold commented on SUREFIRE-839:
---------------------------------------------

@Andreas; would you mind supplying a minimal testcase project that reproduces the problem ?

I just know I'm going to break this again if we dont have an IT for this...


See http://maven.apache.org/surefire/maven-surefire-plugin/developing.html for info on how to create those projects ;)
                
> If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-839
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-839
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Junit 4.7+ (parallel) support
>    Affects Versions: 2.12
>            Reporter: Martin Burger
>            Assignee: Kristian Rosenvold
>             Fix For: 2.13
>
>
> In a multi-module project, I configured Surefire to execute tests of a selected JUnit category only. Unfortunately, not all modules contain tests in that category, which makes mvn test fail:
> Tests in error: 
>   initializationError(org.junit.runner.manipulation.Filter): No tests found matching *foo.junit.categories.SlowTests from org.junit.runner.Request$1@15a
> If a module does not contain any test that would match the given category, Surefire should continue instead. Note that specifying -DfailIfNoTests=false does not help in that case.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (SUREFIRE-839) If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/SUREFIRE-839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=315265#comment-315265 ] 

Kristian Rosenvold commented on SUREFIRE-839:
---------------------------------------------

@Andreas; it might be that my change was a bit too big. I suspect that it might have been sufficient to just pass the list of classes to run to junit, since it obviously pukes if you pass it a single class and that contains nothing runnable. 
                
> If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-839
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-839
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Junit 4.7+ (parallel) support
>    Affects Versions: 2.12
>            Reporter: Martin Burger
>            Assignee: Kristian Rosenvold
>             Fix For: 2.13
>
>
> In a multi-module project, I configured Surefire to execute tests of a selected JUnit category only. Unfortunately, not all modules contain tests in that category, which makes mvn test fail:
> Tests in error: 
>   initializationError(org.junit.runner.manipulation.Filter): No tests found matching *foo.junit.categories.SlowTests from org.junit.runner.Request$1@15a
> If a module does not contain any test that would match the given category, Surefire should continue instead. Note that specifying -DfailIfNoTests=false does not help in that case.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (SUREFIRE-839) If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/SUREFIRE-839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Rosenvold updated SUREFIRE-839:
----------------------------------------

    Comment: was deleted

(was: This issue is a general problem that has no easy solution. Setting -DfailIfNoTests=false is the only solution currently)
    
> If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-839
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-839
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Junit 4.7+ (parallel) support
>    Affects Versions: 2.12
>            Reporter: Martin Burger
>
> In a multi-module project, I configured Surefire to execute tests of a selected JUnit category only. Unfortunately, not all modules contain tests in that category, which makes mvn test fail:
> Tests in error: 
>   initializationError(org.junit.runner.manipulation.Filter): No tests found matching *foo.junit.categories.SlowTests from org.junit.runner.Request$1@15a
> If a module does not contain any test that would match the given category, Surefire should continue instead. Note that specifying -DfailIfNoTests=false does not help in that case.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (SUREFIRE-839) If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project

Posted by "Andreas Gudian (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/SUREFIRE-839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=315257#comment-315257 ] 

Andreas Gudian commented on SUREFIRE-839:
-----------------------------------------

Kristian, this fix breaks SUREFIRE-751: using getLocatedClasses() on the LazyTestsToRun causes an unsupported-operation-exception. Checking if a class constains something runnable can, for the reusable fork, only happen at the time that class is actually to be handed over to JUnit. Otherwise, the classes to run will not be distributed evenly among the forks.
I'll try a different approach and get back to you... :)
                
> If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-839
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-839
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Junit 4.7+ (parallel) support
>    Affects Versions: 2.12
>            Reporter: Martin Burger
>            Assignee: Kristian Rosenvold
>             Fix For: 2.13
>
>
> In a multi-module project, I configured Surefire to execute tests of a selected JUnit category only. Unfortunately, not all modules contain tests in that category, which makes mvn test fail:
> Tests in error: 
>   initializationError(org.junit.runner.manipulation.Filter): No tests found matching *foo.junit.categories.SlowTests from org.junit.runner.Request$1@15a
> If a module does not contain any test that would match the given category, Surefire should continue instead. Note that specifying -DfailIfNoTests=false does not help in that case.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (SUREFIRE-839) If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project

Posted by "Andreas Gudian (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/SUREFIRE-839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=315266#comment-315266 ] 

Andreas Gudian commented on SUREFIRE-839:
-----------------------------------------

@Kristian, that is actually the part that you should have kept as it was. I now changed it, so that the canRunClass-check will be performed only during {{getSuites()}}. That way, the list of classes will not contain any no-ops. 

Passing the classes one-by-one or all at once as a list to JUnit would not solve the problem, I guess. It would only hide it better, as we would probaply get that exceptioin puked on us anyway, if all the classes in the list are filtered out.

However, the onceperthread forkmode _requires_ the tests to be passed to JUnit once at a time, as the forked process needs to _ask_ for a new test class after it executed the last one (that's what the Iterator in {{LazyTestsToRun}} does on {{hasNext()}}).

I've sent a pull request for my changes... :)
                
> If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-839
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-839
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Junit 4.7+ (parallel) support
>    Affects Versions: 2.12
>            Reporter: Martin Burger
>            Assignee: Kristian Rosenvold
>             Fix For: 2.13
>
>
> In a multi-module project, I configured Surefire to execute tests of a selected JUnit category only. Unfortunately, not all modules contain tests in that category, which makes mvn test fail:
> Tests in error: 
>   initializationError(org.junit.runner.manipulation.Filter): No tests found matching *foo.junit.categories.SlowTests from org.junit.runner.Request$1@15a
> If a module does not contain any test that would match the given category, Surefire should continue instead. Note that specifying -DfailIfNoTests=false does not help in that case.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (SUREFIRE-839) If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project

Posted by "Craig Pardey (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/SUREFIRE-839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=313548#comment-313548 ] 

Craig Pardey commented on SUREFIRE-839:
---------------------------------------

Setting -DfailIfNoTests=false does _not_ work.
                
> If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-839
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-839
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Junit 4.7+ (parallel) support
>    Affects Versions: 2.12
>            Reporter: Martin Burger
>
> In a multi-module project, I configured Surefire to execute tests of a selected JUnit category only. Unfortunately, not all modules contain tests in that category, which makes mvn test fail:
> Tests in error: 
>   initializationError(org.junit.runner.manipulation.Filter): No tests found matching *foo.junit.categories.SlowTests from org.junit.runner.Request$1@15a
> If a module does not contain any test that would match the given category, Surefire should continue instead. Note that specifying -DfailIfNoTests=false does not help in that case.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (SUREFIRE-839) If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/SUREFIRE-839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Rosenvold closed SUREFIRE-839.
---------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.13
         Assignee: Kristian Rosenvold

Fixed with IT in d342273c30c0ec8aa5ba58603b1d9ceea5039278
                
> If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-839
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-839
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Junit 4.7+ (parallel) support
>    Affects Versions: 2.12
>            Reporter: Martin Burger
>            Assignee: Kristian Rosenvold
>             Fix For: 2.13
>
>
> In a multi-module project, I configured Surefire to execute tests of a selected JUnit category only. Unfortunately, not all modules contain tests in that category, which makes mvn test fail:
> Tests in error: 
>   initializationError(org.junit.runner.manipulation.Filter): No tests found matching *foo.junit.categories.SlowTests from org.junit.runner.Request$1@15a
> If a module does not contain any test that would match the given category, Surefire should continue instead. Note that specifying -DfailIfNoTests=false does not help in that case.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (SUREFIRE-839) If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/SUREFIRE-839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Rosenvold updated SUREFIRE-839:
----------------------------------------

    Issue Type: Improvement  (was: Bug)
    
> If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-839
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-839
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Junit 4.7+ (parallel) support
>    Affects Versions: 2.12
>            Reporter: Martin Burger
>
> In a multi-module project, I configured Surefire to execute tests of a selected JUnit category only. Unfortunately, not all modules contain tests in that category, which makes mvn test fail:
> Tests in error: 
>   initializationError(org.junit.runner.manipulation.Filter): No tests found matching *foo.junit.categories.SlowTests from org.junit.runner.Request$1@15a
> If a module does not contain any test that would match the given category, Surefire should continue instead. Note that specifying -DfailIfNoTests=false does not help in that case.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (SUREFIRE-839) If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/SUREFIRE-839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=315263#comment-315263 ] 

Kristian Rosenvold commented on SUREFIRE-839:
---------------------------------------------

Nice if you take a look; am planning a release in a few days so let me know how it works out
                
> If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-839
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-839
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Junit 4.7+ (parallel) support
>    Affects Versions: 2.12
>            Reporter: Martin Burger
>            Assignee: Kristian Rosenvold
>             Fix For: 2.13
>
>
> In a multi-module project, I configured Surefire to execute tests of a selected JUnit category only. Unfortunately, not all modules contain tests in that category, which makes mvn test fail:
> Tests in error: 
>   initializationError(org.junit.runner.manipulation.Filter): No tests found matching *foo.junit.categories.SlowTests from org.junit.runner.Request$1@15a
> If a module does not contain any test that would match the given category, Surefire should continue instead. Note that specifying -DfailIfNoTests=false does not help in that case.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (SUREFIRE-839) If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project

Posted by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/SUREFIRE-839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Rosenvold updated SUREFIRE-839:
----------------------------------------

    Issue Type: Improvement  (was: Bug)
    
> If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-839
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-839
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Junit 4.7+ (parallel) support
>    Affects Versions: 2.12
>            Reporter: Martin Burger
>
> In a multi-module project, I configured Surefire to execute tests of a selected JUnit category only. Unfortunately, not all modules contain tests in that category, which makes mvn test fail:
> Tests in error: 
>   initializationError(org.junit.runner.manipulation.Filter): No tests found matching *foo.junit.categories.SlowTests from org.junit.runner.Request$1@15a
> If a module does not contain any test that would match the given category, Surefire should continue instead. Note that specifying -DfailIfNoTests=false does not help in that case.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (SUREFIRE-839) If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project

Posted by "Markus Bartels (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/SUREFIRE-839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=314720#comment-314720 ] 

Markus Bartels commented on SUREFIRE-839:
-----------------------------------------

Same here.

Configuration:
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<excludedGroups>
						com.test.MyGroup,
						com.test.MyGroup2
					</excludedGroups>
					<failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
					<failIfNoTests>false</failIfNoTests>
				</configuration>
			</plugin>

Leads to:
Concurrency config is parallel='none', perCoreThreadCount=true, threadCount=2, useUnlimitedThreads=false
Running org.junit.runner.manipulation.Filter
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec <<< FAILURE!
initializationError(org.junit.runner.manipulation.Filter)  Time elapsed: 0 sec
<<< ERROR!
java.lang.Exception: No tests found matching NOT *com.test.MyGroup OR *com.test.MyGroup2 from
 org.junit.runner.Request$1@1e3c2c6
        at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:37)
        at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
        at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:62)
        at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:139)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
        at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
        at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

		Results :

Tests in error:
  initializationError(org.junit.runner.manipulation.Filter): No tests found matching NOT *com.test.MyGroup OR *com.test.MyGroup2 from org.junit.runner.Request$1@1e3c2c6
  
                
> If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-839
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-839
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Junit 4.7+ (parallel) support
>    Affects Versions: 2.12
>            Reporter: Martin Burger
>
> In a multi-module project, I configured Surefire to execute tests of a selected JUnit category only. Unfortunately, not all modules contain tests in that category, which makes mvn test fail:
> Tests in error: 
>   initializationError(org.junit.runner.manipulation.Filter): No tests found matching *foo.junit.categories.SlowTests from org.junit.runner.Request$1@15a
> If a module does not contain any test that would match the given category, Surefire should continue instead. Note that specifying -DfailIfNoTests=false does not help in that case.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (SUREFIRE-839) If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project

Posted by "Andreas Gudian (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/SUREFIRE-839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=315271#comment-315271 ] 

Andreas Gudian commented on SUREFIRE-839:
-----------------------------------------

@Kristian: the pull-request extends your IT with a forked version. I guess the ForkModeIT uses another test provider and therefor did not fail - could that be?
                
> If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-839
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-839
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Junit 4.7+ (parallel) support
>    Affects Versions: 2.12
>            Reporter: Martin Burger
>            Assignee: Kristian Rosenvold
>             Fix For: 2.13
>
>
> In a multi-module project, I configured Surefire to execute tests of a selected JUnit category only. Unfortunately, not all modules contain tests in that category, which makes mvn test fail:
> Tests in error: 
>   initializationError(org.junit.runner.manipulation.Filter): No tests found matching *foo.junit.categories.SlowTests from org.junit.runner.Request$1@15a
> If a module does not contain any test that would match the given category, Surefire should continue instead. Note that specifying -DfailIfNoTests=false does not help in that case.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (SUREFIRE-839) If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project

Posted by "Gayathri Muralidharan (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/SUREFIRE-839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=294576#comment-294576 ] 

Gayathri Muralidharan commented on SUREFIRE-839:
------------------------------------------------

Facing the same issue.

Thanks,
Gayathri

                
> If no tests are found that would match a given JUnit category, mvn test should not fail in multi-module project
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-839
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-839
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Junit 4.7+ (parallel) support
>    Affects Versions: 2.12
>            Reporter: Martin Burger
>
> In a multi-module project, I configured Surefire to execute tests of a selected JUnit category only. Unfortunately, not all modules contain tests in that category, which makes mvn test fail:
> Tests in error: 
>   initializationError(org.junit.runner.manipulation.Filter): No tests found matching *foo.junit.categories.SlowTests from org.junit.runner.Request$1@15a
> If a module does not contain any test that would match the given category, Surefire should continue instead. Note that specifying -DfailIfNoTests=false does not help in that case.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira