[jira] (SUREFIRE-974) Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined
[ https://jira.codehaus.org/browse/SUREFIRE-974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=323380#comment-323380 ] Jesse Glick commented on SUREFIRE-974: -- I filed SUREFIRE-984 to track the reporting format. Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined - Key: SUREFIRE-974 URL: https://jira.codehaus.org/browse/SUREFIRE-974 Project: Maven Surefire Issue Type: Bug Affects Versions: 2.14 Reporter: Jesse Glick Assignee: Andreas Gudian Attachments: SUREFIRE-974.zip In Jenkins sources @ 919bab8, run: {{mvn -f test/pom.xml -Dtest=CoreJellyTest -Dtest.excluded.groups=org.jvnet.hudson.test.FailsOnCloud test}} You will get errors from every test case in this suite. When {{test.excluded.groups}} is not defined, it passes. This property just sets {{excludedGroups}} for the benefit of some unrelated JUnit 4 tests in the same module which use {{@Category}}. But turning it on apparently changes how JUnit 3 tests are run, too. The named suite has a {{public static Test suite()}} method which creates a subclass of {{TestSuite}} that overrides {{void run(TestResult)}}; when {{excludedGroups}} is defined, a plain {{TestSuite}} is created which fails to set the proper context for test cases and fails utterly. Refactoring this test suite to use JUnit 4 idioms is probably not an option at the moment for compatibility reasons. Why is Surefire failing to correctly run JUnit 3 tests just because groups are defined? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (SUREFIRE-974) Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined
[ https://jira.codehaus.org/browse/SUREFIRE-974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesse Glick closed SUREFIRE-974. Resolution: Won't Fix I do not see anything Surefire could do either. I did find a simple workaround, though: extend {{JUnit4TestAdapter}} rather than {{TestSuite}}. This even works properly when running single test methods. Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined - Key: SUREFIRE-974 URL: https://jira.codehaus.org/browse/SUREFIRE-974 Project: Maven Surefire Issue Type: Bug Affects Versions: 2.14 Reporter: Jesse Glick Assignee: Andreas Gudian Fix For: 2.15 Attachments: SUREFIRE-974.zip In Jenkins sources @ 919bab8, run: {{mvn -f test/pom.xml -Dtest=CoreJellyTest -Dtest.excluded.groups=org.jvnet.hudson.test.FailsOnCloud test}} You will get errors from every test case in this suite. When {{test.excluded.groups}} is not defined, it passes. This property just sets {{excludedGroups}} for the benefit of some unrelated JUnit 4 tests in the same module which use {{@Category}}. But turning it on apparently changes how JUnit 3 tests are run, too. The named suite has a {{public static Test suite()}} method which creates a subclass of {{TestSuite}} that overrides {{void run(TestResult)}}; when {{excludedGroups}} is defined, a plain {{TestSuite}} is created which fails to set the proper context for test cases and fails utterly. Refactoring this test suite to use JUnit 4 idioms is probably not an option at the moment for compatibility reasons. Why is Surefire failing to correctly run JUnit 3 tests just because groups are defined? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (SUREFIRE-974) Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined
[ https://jira.codehaus.org/browse/SUREFIRE-974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=322817#comment-322817 ] Jesse Glick commented on SUREFIRE-974: -- The {{JUnit4TestAdapter}} workaround does not work when using {{TestSuite.init()}} and {{.addTest(Test)}}, however. For that case implementing {{Filterable}} to do nothing is acceptable since typically the {{Test suite()}} computed a set of tests to add in a way that would not intrinsically support filtering to begin with; in my case the test cases do not correspond to methods. I do notice some other differences in the result files between test runs using {{excludedGroups}} and those without. For example, normally {{TEST-*.xml}} is named according to the class defining the {{suite}} method, with {{classname}} specifying the class extending {{TestSuite}}. But with {{excludedGroups}} the result file is named according to the suite class ({{classname}} also specifying this), and there is no indication anywhere of the name of the class defining {{suite}}. Not sure if this is fixable on the Surefire side. Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined - Key: SUREFIRE-974 URL: https://jira.codehaus.org/browse/SUREFIRE-974 Project: Maven Surefire Issue Type: Bug Affects Versions: 2.14 Reporter: Jesse Glick Assignee: Andreas Gudian Fix For: 2.15 Attachments: SUREFIRE-974.zip In Jenkins sources @ 919bab8, run: {{mvn -f test/pom.xml -Dtest=CoreJellyTest -Dtest.excluded.groups=org.jvnet.hudson.test.FailsOnCloud test}} You will get errors from every test case in this suite. When {{test.excluded.groups}} is not defined, it passes. This property just sets {{excludedGroups}} for the benefit of some unrelated JUnit 4 tests in the same module which use {{@Category}}. But turning it on apparently changes how JUnit 3 tests are run, too. The named suite has a {{public static Test suite()}} method which creates a subclass of {{TestSuite}} that overrides {{void run(TestResult)}}; when {{excludedGroups}} is defined, a plain {{TestSuite}} is created which fails to set the proper context for test cases and fails utterly. Refactoring this test suite to use JUnit 4 idioms is probably not an option at the moment for compatibility reasons. Why is Surefire failing to correctly run JUnit 3 tests just because groups are defined? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (SUREFIRE-974) Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined
[ https://jira.codehaus.org/browse/SUREFIRE-974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=322821#comment-322821 ] Andreas Gudian commented on SUREFIRE-974: - Thanks for the feedback and for closing the issue ;) Could you create a small example for the problem with the report-file problem? I'm not sure I got what you mean exactly. Also, please check how it behaves with the latest 2.15-SNAPSHOT, as I did some tickling on the report code for the junit-47 provider. We should track that in a separate issue, though. Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined - Key: SUREFIRE-974 URL: https://jira.codehaus.org/browse/SUREFIRE-974 Project: Maven Surefire Issue Type: Bug Affects Versions: 2.14 Reporter: Jesse Glick Assignee: Andreas Gudian Fix For: 2.15 Attachments: SUREFIRE-974.zip In Jenkins sources @ 919bab8, run: {{mvn -f test/pom.xml -Dtest=CoreJellyTest -Dtest.excluded.groups=org.jvnet.hudson.test.FailsOnCloud test}} You will get errors from every test case in this suite. When {{test.excluded.groups}} is not defined, it passes. This property just sets {{excludedGroups}} for the benefit of some unrelated JUnit 4 tests in the same module which use {{@Category}}. But turning it on apparently changes how JUnit 3 tests are run, too. The named suite has a {{public static Test suite()}} method which creates a subclass of {{TestSuite}} that overrides {{void run(TestResult)}}; when {{excludedGroups}} is defined, a plain {{TestSuite}} is created which fails to set the proper context for test cases and fails utterly. Refactoring this test suite to use JUnit 4 idioms is probably not an option at the moment for compatibility reasons. Why is Surefire failing to correctly run JUnit 3 tests just because groups are defined? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (SUREFIRE-974) Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined
[ https://jira.codehaus.org/browse/SUREFIRE-974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andreas Gudian updated SUREFIRE-974: Fix Version/s: (was: 2.15) Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined - Key: SUREFIRE-974 URL: https://jira.codehaus.org/browse/SUREFIRE-974 Project: Maven Surefire Issue Type: Bug Affects Versions: 2.14 Reporter: Jesse Glick Assignee: Andreas Gudian Attachments: SUREFIRE-974.zip In Jenkins sources @ 919bab8, run: {{mvn -f test/pom.xml -Dtest=CoreJellyTest -Dtest.excluded.groups=org.jvnet.hudson.test.FailsOnCloud test}} You will get errors from every test case in this suite. When {{test.excluded.groups}} is not defined, it passes. This property just sets {{excludedGroups}} for the benefit of some unrelated JUnit 4 tests in the same module which use {{@Category}}. But turning it on apparently changes how JUnit 3 tests are run, too. The named suite has a {{public static Test suite()}} method which creates a subclass of {{TestSuite}} that overrides {{void run(TestResult)}}; when {{excludedGroups}} is defined, a plain {{TestSuite}} is created which fails to set the proper context for test cases and fails utterly. Refactoring this test suite to use JUnit 4 idioms is probably not an option at the moment for compatibility reasons. Why is Surefire failing to correctly run JUnit 3 tests just because groups are defined? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (SUREFIRE-974) Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined
[ https://jira.codehaus.org/browse/SUREFIRE-974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=322630#comment-322630 ] Andreas Gudian commented on SUREFIRE-974: - This is why it happens. The junit47 runner uses Filters to do all kinds of filtering (groups, method-patterns). And this is, what JUnit makes of it when it tries to filter a JUnit3-style test class: {code|title=org.junit.internal.runners.JUnit38ClassRunner} public void filter(Filter filter) throws NoTestsRemainException { if (getTest() instanceof Filterable) { Filterable adapter = (Filterable) getTest(); adapter.filter(filter); } else if (getTest() instanceof TestSuite) { TestSuite suite = (TestSuite) getTest(); TestSuite filtered = new TestSuite(suite.getName()); int n = suite.testCount(); for (int i = 0; i n; i++) { Test test = suite.testAt(i); if (filter.shouldRun(makeDescription(test))) { filtered.addTest(test); } } setTest(filtered); } } {code} As you can see, your specific TestCase implementation is dropped and replaced by a fresh TestSuite instance, with the filtered tests added. What you could do in your test is to either just rely on setUp/tearDown to perform intialization before/after the tests, or to implement Filterable and just do nothing in that implementation ;) Form the top of my head, I don't see what Surefire could do against that. Any suggestions? Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined - Key: SUREFIRE-974 URL: https://jira.codehaus.org/browse/SUREFIRE-974 Project: Maven Surefire Issue Type: Bug Affects Versions: 2.14 Reporter: Jesse Glick Assignee: Andreas Gudian Fix For: 2.15 Attachments: SUREFIRE-974.zip In Jenkins sources @ 919bab8, run: {{mvn -f test/pom.xml -Dtest=CoreJellyTest -Dtest.excluded.groups=org.jvnet.hudson.test.FailsOnCloud test}} You will get errors from every test case in this suite. When {{test.excluded.groups}} is not defined, it passes. This property just sets {{excludedGroups}} for the benefit of some unrelated JUnit 4 tests in the same module which use {{@Category}}. But turning it on apparently changes how JUnit 3 tests are run, too. The named suite has a {{public static Test suite()}} method which creates a subclass of {{TestSuite}} that overrides {{void run(TestResult)}}; when {{excludedGroups}} is defined, a plain {{TestSuite}} is created which fails to set the proper context for test cases and fails utterly. Refactoring this test suite to use JUnit 4 idioms is probably not an option at the moment for compatibility reasons. Why is Surefire failing to correctly run JUnit 3 tests just because groups are defined? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (SUREFIRE-974) Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined
[ https://jira.codehaus.org/browse/SUREFIRE-974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=322630#comment-322630 ] Andreas Gudian edited comment on SUREFIRE-974 at 3/25/13 4:51 PM: -- This is why it happens. The junit47 runner uses Filters to do all kinds of filtering (groups, method-patterns). And this is, what JUnit makes of it when it tries to filter a JUnit3-style test class: {code:title=org.junit.internal.runners.JUnit38ClassRunner} public void filter(Filter filter) throws NoTestsRemainException { if (getTest() instanceof Filterable) { Filterable adapter = (Filterable) getTest(); adapter.filter(filter); } else if (getTest() instanceof TestSuite) { TestSuite suite = (TestSuite) getTest(); TestSuite filtered = new TestSuite(suite.getName()); int n = suite.testCount(); for (int i = 0; i n; i++) { Test test = suite.testAt(i); if (filter.shouldRun(makeDescription(test))) { filtered.addTest(test); } } setTest(filtered); } } {code} As you can see, your specific TestCase implementation is dropped and replaced by a fresh TestSuite instance, with the filtered tests added. What you could do in your test is to either just rely on setUp/tearDown to perform intialization before/after the tests, or to implement Filterable and just do nothing in that implementation ;) Form the top of my head, I don't see what Surefire could do against that. Any suggestions? was (Author: agudian): This is why it happens. The junit47 runner uses Filters to do all kinds of filtering (groups, method-patterns). And this is, what JUnit makes of it when it tries to filter a JUnit3-style test class: {code|title=org.junit.internal.runners.JUnit38ClassRunner} public void filter(Filter filter) throws NoTestsRemainException { if (getTest() instanceof Filterable) { Filterable adapter = (Filterable) getTest(); adapter.filter(filter); } else if (getTest() instanceof TestSuite) { TestSuite suite = (TestSuite) getTest(); TestSuite filtered = new TestSuite(suite.getName()); int n = suite.testCount(); for (int i = 0; i n; i++) { Test test = suite.testAt(i); if (filter.shouldRun(makeDescription(test))) { filtered.addTest(test); } } setTest(filtered); } } {code} As you can see, your specific TestCase implementation is dropped and replaced by a fresh TestSuite instance, with the filtered tests added. What you could do in your test is to either just rely on setUp/tearDown to perform intialization before/after the tests, or to implement Filterable and just do nothing in that implementation ;) Form the top of my head, I don't see what Surefire could do against that. Any suggestions? Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined - Key: SUREFIRE-974 URL: https://jira.codehaus.org/browse/SUREFIRE-974 Project: Maven Surefire Issue Type: Bug Affects Versions: 2.14 Reporter: Jesse Glick Assignee: Andreas Gudian Fix For: 2.15 Attachments: SUREFIRE-974.zip In Jenkins sources @ 919bab8, run: {{mvn -f test/pom.xml -Dtest=CoreJellyTest -Dtest.excluded.groups=org.jvnet.hudson.test.FailsOnCloud test}} You will get errors from every test case in this suite. When {{test.excluded.groups}} is not defined, it passes. This property just sets {{excludedGroups}} for the benefit of some unrelated JUnit 4 tests in the same module which use {{@Category}}. But turning it on apparently changes how JUnit 3 tests are run, too. The named suite has a {{public static Test suite()}} method which creates a subclass of {{TestSuite}} that overrides {{void run(TestResult)}}; when {{excludedGroups}} is defined, a plain {{TestSuite}} is created which fails to set the proper context for test cases and fails utterly. Refactoring this test suite to use JUnit 4 idioms is probably not an option at the moment for compatibility reasons. Why is Surefire failing to correctly run JUnit 3 tests just because groups are defined? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (SUREFIRE-974) Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined
Jesse Glick created SUREFIRE-974: Summary: Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined Key: SUREFIRE-974 URL: https://jira.codehaus.org/browse/SUREFIRE-974 Project: Maven Surefire Issue Type: Bug Affects Versions: 2.14 Reporter: Jesse Glick In Jenkins sources @ 919bab8, run: {{mvn -f test/pom.xml -Dtest=CoreJellyTest -Dtest.excluded.groups=org.jvnet.hudson.test.FailsOnCloud test}} You will get errors from every test case in this suite. When {{test.excluded.groups}} is not defined, it passes. This property just sets {{excludedGroups}} for the benefit of some unrelated JUnit 4 tests in the same module which use {{@Category}}. But turning it on apparently changes how JUnit 3 tests are run, too. The named suite has a {{public static Test suite()}} method which creates a subclass of {{TestSuite}} that overrides {{void run(TestResult)}}; when {{excludedGroups}} is defined, a plain {{TestSuite}} is created which fails to set the proper context for test cases and fails utterly. Refactoring this test suite to use JUnit 4 idioms is probably not an option at the moment for compatibility reasons. Why is Surefire failing to correctly run JUnit 3 tests just because groups are defined? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (SUREFIRE-974) Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined
[ https://jira.codehaus.org/browse/SUREFIRE-974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=322096#comment-322096 ] Andreas Gudian commented on SUREFIRE-974: - For a test execution in one module, Surefire auto-selects exactly one of its test-provider implementations (that's the internal name of the components that bridge from Surefire to an arbitrary test framework, such das TestNG, JUnit3, JUnit 4 and JUnit 4.7). As soon as grouping or the parallel option is set to something else then the default and Junit = 4.7 is on the classpath, Surefire will select the test provider surefire-junit47. If neither grouping nor parallel is specified, surefire-junit4 is selected (if JUnit = 4 is on the classpath). The difference between both of them is the way they hand over the class to JUnit. surefire-junit4 does {{Request.aClass( testClass ).getRunner().run(...)}}, whereas junit47 does something like the following (without threading / parallel forking): {code} JUnitCore junitCore = new JUnitCore(); Request req = Request.classes( new Computer(), classesToRun ); junitCore.run( req ); {code} If that doesn't help you and you're still sure to some extent that this is not a bug in JUnit itself, but in Surefire, then perhaps provide us a small and condensed example project. Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined - Key: SUREFIRE-974 URL: https://jira.codehaus.org/browse/SUREFIRE-974 Project: Maven Surefire Issue Type: Bug Affects Versions: 2.14 Reporter: Jesse Glick In Jenkins sources @ 919bab8, run: {{mvn -f test/pom.xml -Dtest=CoreJellyTest -Dtest.excluded.groups=org.jvnet.hudson.test.FailsOnCloud test}} You will get errors from every test case in this suite. When {{test.excluded.groups}} is not defined, it passes. This property just sets {{excludedGroups}} for the benefit of some unrelated JUnit 4 tests in the same module which use {{@Category}}. But turning it on apparently changes how JUnit 3 tests are run, too. The named suite has a {{public static Test suite()}} method which creates a subclass of {{TestSuite}} that overrides {{void run(TestResult)}}; when {{excludedGroups}} is defined, a plain {{TestSuite}} is created which fails to set the proper context for test cases and fails utterly. Refactoring this test suite to use JUnit 4 idioms is probably not an option at the moment for compatibility reasons. Why is Surefire failing to correctly run JUnit 3 tests just because groups are defined? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (SUREFIRE-974) Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined
[ https://jira.codehaus.org/browse/SUREFIRE-974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jesse Glick updated SUREFIRE-974: - Attachment: SUREFIRE-974.zip Attaching a demo project. {{mvn test}} works as expected. {{mvn -Pbug test}} excludes {{Complex4Test.two}} as expected, but also makes {{Complex3Test}} fails. Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined - Key: SUREFIRE-974 URL: https://jira.codehaus.org/browse/SUREFIRE-974 Project: Maven Surefire Issue Type: Bug Affects Versions: 2.14 Reporter: Jesse Glick Attachments: SUREFIRE-974.zip In Jenkins sources @ 919bab8, run: {{mvn -f test/pom.xml -Dtest=CoreJellyTest -Dtest.excluded.groups=org.jvnet.hudson.test.FailsOnCloud test}} You will get errors from every test case in this suite. When {{test.excluded.groups}} is not defined, it passes. This property just sets {{excludedGroups}} for the benefit of some unrelated JUnit 4 tests in the same module which use {{@Category}}. But turning it on apparently changes how JUnit 3 tests are run, too. The named suite has a {{public static Test suite()}} method which creates a subclass of {{TestSuite}} that overrides {{void run(TestResult)}}; when {{excludedGroups}} is defined, a plain {{TestSuite}} is created which fails to set the proper context for test cases and fails utterly. Refactoring this test suite to use JUnit 4 idioms is probably not an option at the moment for compatibility reasons. Why is Surefire failing to correctly run JUnit 3 tests just because groups are defined? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (SUREFIRE-974) Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined
[ https://jira.codehaus.org/browse/SUREFIRE-974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=322102#comment-322102 ] Jesse Glick commented on SUREFIRE-974: -- If there is a bug in JUnit itself, I cannot find it: {code} System.err.println(surefire-junit4); RunNotifier notifier = new RunNotifier(); notifier.addListener(new TextListener(System.err)); Request.aClass(Complex3Test.class).getRunner().run(notifier); System.err.println(surefire-junit47); JUnitCore core = new JUnitCore(); core.addListener(new TextListener(System.err)); System.err.println(failures: + core.run(Request.classes(new Computer(), Complex3Test.class)).getFailureCount()); {code} Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined - Key: SUREFIRE-974 URL: https://jira.codehaus.org/browse/SUREFIRE-974 Project: Maven Surefire Issue Type: Bug Affects Versions: 2.14 Reporter: Jesse Glick Attachments: SUREFIRE-974.zip In Jenkins sources @ 919bab8, run: {{mvn -f test/pom.xml -Dtest=CoreJellyTest -Dtest.excluded.groups=org.jvnet.hudson.test.FailsOnCloud test}} You will get errors from every test case in this suite. When {{test.excluded.groups}} is not defined, it passes. This property just sets {{excludedGroups}} for the benefit of some unrelated JUnit 4 tests in the same module which use {{@Category}}. But turning it on apparently changes how JUnit 3 tests are run, too. The named suite has a {{public static Test suite()}} method which creates a subclass of {{TestSuite}} that overrides {{void run(TestResult)}}; when {{excludedGroups}} is defined, a plain {{TestSuite}} is created which fails to set the proper context for test cases and fails utterly. Refactoring this test suite to use JUnit 4 idioms is probably not an option at the moment for compatibility reasons. Why is Surefire failing to correctly run JUnit 3 tests just because groups are defined? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (SUREFIRE-974) Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined
[ https://jira.codehaus.org/browse/SUREFIRE-974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andreas Gudian updated SUREFIRE-974: Fix Version/s: 2.15 Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined - Key: SUREFIRE-974 URL: https://jira.codehaus.org/browse/SUREFIRE-974 Project: Maven Surefire Issue Type: Bug Affects Versions: 2.14 Reporter: Jesse Glick Fix For: 2.15 Attachments: SUREFIRE-974.zip In Jenkins sources @ 919bab8, run: {{mvn -f test/pom.xml -Dtest=CoreJellyTest -Dtest.excluded.groups=org.jvnet.hudson.test.FailsOnCloud test}} You will get errors from every test case in this suite. When {{test.excluded.groups}} is not defined, it passes. This property just sets {{excludedGroups}} for the benefit of some unrelated JUnit 4 tests in the same module which use {{@Category}}. But turning it on apparently changes how JUnit 3 tests are run, too. The named suite has a {{public static Test suite()}} method which creates a subclass of {{TestSuite}} that overrides {{void run(TestResult)}}; when {{excludedGroups}} is defined, a plain {{TestSuite}} is created which fails to set the proper context for test cases and fails utterly. Refactoring this test suite to use JUnit 4 idioms is probably not an option at the moment for compatibility reasons. Why is Surefire failing to correctly run JUnit 3 tests just because groups are defined? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (SUREFIRE-974) Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined
[ https://jira.codehaus.org/browse/SUREFIRE-974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=322106#comment-322106 ] Andreas Gudian commented on SUREFIRE-974: - OK then, I'll take a closer look. Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined - Key: SUREFIRE-974 URL: https://jira.codehaus.org/browse/SUREFIRE-974 Project: Maven Surefire Issue Type: Bug Affects Versions: 2.14 Reporter: Jesse Glick Assignee: Andreas Gudian Fix For: 2.15 Attachments: SUREFIRE-974.zip In Jenkins sources @ 919bab8, run: {{mvn -f test/pom.xml -Dtest=CoreJellyTest -Dtest.excluded.groups=org.jvnet.hudson.test.FailsOnCloud test}} You will get errors from every test case in this suite. When {{test.excluded.groups}} is not defined, it passes. This property just sets {{excludedGroups}} for the benefit of some unrelated JUnit 4 tests in the same module which use {{@Category}}. But turning it on apparently changes how JUnit 3 tests are run, too. The named suite has a {{public static Test suite()}} method which creates a subclass of {{TestSuite}} that overrides {{void run(TestResult)}}; when {{excludedGroups}} is defined, a plain {{TestSuite}} is created which fails to set the proper context for test cases and fails utterly. Refactoring this test suite to use JUnit 4 idioms is probably not an option at the moment for compatibility reasons. Why is Surefire failing to correctly run JUnit 3 tests just because groups are defined? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] (SUREFIRE-974) Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined
[ https://jira.codehaus.org/browse/SUREFIRE-974?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andreas Gudian reassigned SUREFIRE-974: --- Assignee: Andreas Gudian Custom junit.framework.TestSuite subtypes ignored when excludedGroups defined - Key: SUREFIRE-974 URL: https://jira.codehaus.org/browse/SUREFIRE-974 Project: Maven Surefire Issue Type: Bug Affects Versions: 2.14 Reporter: Jesse Glick Assignee: Andreas Gudian Fix For: 2.15 Attachments: SUREFIRE-974.zip In Jenkins sources @ 919bab8, run: {{mvn -f test/pom.xml -Dtest=CoreJellyTest -Dtest.excluded.groups=org.jvnet.hudson.test.FailsOnCloud test}} You will get errors from every test case in this suite. When {{test.excluded.groups}} is not defined, it passes. This property just sets {{excludedGroups}} for the benefit of some unrelated JUnit 4 tests in the same module which use {{@Category}}. But turning it on apparently changes how JUnit 3 tests are run, too. The named suite has a {{public static Test suite()}} method which creates a subclass of {{TestSuite}} that overrides {{void run(TestResult)}}; when {{excludedGroups}} is defined, a plain {{TestSuite}} is created which fails to set the proper context for test cases and fails utterly. Refactoring this test suite to use JUnit 4 idioms is probably not an option at the moment for compatibility reasons. Why is Surefire failing to correctly run JUnit 3 tests just because groups are defined? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira