Re: excluding/including tests in surefire-plugin in different phases
diroussel, Try adding skiptrue/skip in pluginconfiguration (not in execution) and please let me know if it works. I too experienced this behaviour and found it pretty strange. - Yann 2006/11/15, diroussel [EMAIL PROTECTED]: Jan, did you find a solution to this? It looks to me that the exclude feature doesn't work, which is why others seem to be using more elaborate techniques to getting integration tests working (separate module, or using profiles). I found this comment in SurefirePlugin.java (maven-surefire-plugin-2.2) // Have to wrap in an ArrayList as surefire expects an ArrayList instead of a List for some reason This wrapping is only done for the detaul includes and excludes, but not for user supplied values. Note sure how the excludes setter is called, all this mojo stuff is just magic to me. Here is my config, which doesn't exlcude either: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId configuration forkModeonce/forkMode property namejava.util.prefs.PreferencesFactory/name valuecom.euroclear.framework.config.EuroclearPreferencesFactory/value /property /configuration executions execution idunit-test/id phasetest/phase goals goaltest/goal /goals configuration skipfalse/skip includes include**/Test*.java/include include**/*Test.java/include include**/*TestCase.java/include /includes excludes exclude**/*IntTest.java/exclude /excludes /configuration /execution execution idint-test/id phaseintegration-test/phase goals goaltest/goal /goals configuration skipfalse/skip includes include**/*IntTest.java/include /includes excludes exclude**/Test*.java/exclude exclude**/*Test.java/exclude exclude**/*TestCase.java/exclude /excludes /configuration /execution /executions /plugin -- View this message in context: http://www.nabble.com/excluding-including-tests-in-surefire-plugin-in-different-phases-tf2534887s177.html#a7357185 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: excluding/including tests in surefire-plugin in different phases
Good day to you, Qinxian, I think maven-surefire-pluign can run TestNG. Cheers, Franz 向秦贤 wrote: Hi, Is there a TestNG mvn plugin? TestNG can do test by a failure style. first run all, and run failures. If not, a testng mvn plugin maybe is good idea. Isn't it? Regards, Qinxian 2006/10/30, franz see [EMAIL PROTECTED]: Jan-Olav wrote: Still struggling with this The configuration below runs all my tests in both phases. Nothing is exluded or included :-( As far as I can see, this config is the same as the one recommended on http://maven.apache.org/plugins/maven-surefire-plugin/examples/inclusion -exclusion.html, where inclusion and exclusion patterns are reversed in the two phases. Any insight greatly appreciated. plugin artifactIdmaven-surefire-plugin/artifactId executions execution idintegration-test/id phaseintegration-test/phase configuration excludes exclude**/Test*.java/exclude /excludes includes include **/TestIntegration.java /include /includes /configuration /execution execution idtest/id phasetest/phase configuration includes include**/Test*.java/include /includes excludes exclude **/TestIntegration.java /exclude /excludes /configuration /execution /executions /plugin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Good day to you, Jan-Olav, For the first execution, try removing the excludes part. I think What are the tests you are tryiing to include and excludes? I think surefire plugin processes the includes first, and the excludes second. if so, you would have excluded **/TestIntegration.java as well. As for the second one. If you only want to run Test.java, you can simply do includes include**/Test.java/include /includes And remove the exclude as well :-) Cheers, Franz -- View this message in context: http://www.nabble.com/excluding-including-tests-in-surefire-plugin-in-different-phases-tf2534887s177.html#a7069340 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 向秦贤 -- View this message in context: http://www.nabble.com/excluding-including-tests-in-surefire-plugin-in-different-phases-tf2534887s177.html#a7394620 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: excluding/including tests in surefire-plugin in different phases
Jan, did you find a solution to this? It looks to me that the exclude feature doesn't work, which is why others seem to be using more elaborate techniques to getting integration tests working (separate module, or using profiles). I found this comment in SurefirePlugin.java (maven-surefire-plugin-2.2) // Have to wrap in an ArrayList as surefire expects an ArrayList instead of a List for some reason This wrapping is only done for the detaul includes and excludes, but not for user supplied values. Note sure how the excludes setter is called, all this mojo stuff is just magic to me. Here is my config, which doesn't exlcude either: plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-surefire-plugin/artifactId configuration forkModeonce/forkMode property namejava.util.prefs.PreferencesFactory/name valuecom.euroclear.framework.config.EuroclearPreferencesFactory/value /property /configuration executions execution idunit-test/id phasetest/phase goals goaltest/goal /goals configuration skipfalse/skip includes include**/Test*.java/include include**/*Test.java/include include**/*TestCase.java/include /includes excludes exclude**/*IntTest.java/exclude /excludes /configuration /execution execution idint-test/id phaseintegration-test/phase goals goaltest/goal /goals configuration skipfalse/skip includes include**/*IntTest.java/include /includes excludes exclude**/Test*.java/exclude exclude**/*Test.java/exclude exclude**/*TestCase.java/exclude /excludes /configuration /execution /executions /plugin -- View this message in context: http://www.nabble.com/excluding-including-tests-in-surefire-plugin-in-different-phases-tf2534887s177.html#a7357185 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
excluding/including tests in surefire-plugin in different phases
Still struggling with this The configuration below runs all my tests in both phases. Nothing is exluded or included :-( As far as I can see, this config is the same as the one recommended on http://maven.apache.org/plugins/maven-surefire-plugin/examples/inclusion -exclusion.html, where inclusion and exclusion patterns are reversed in the two phases. Any insight greatly appreciated. plugin artifactIdmaven-surefire-plugin/artifactId executions execution idintegration-test/id phaseintegration-test/phase configuration excludes exclude**/Test*.java/exclude /excludes includes include **/TestIntegration.java /include /includes /configuration /execution execution idtest/id phasetest/phase configuration includes include**/Test*.java/include /includes excludes exclude **/TestIntegration.java /exclude /excludes /configuration /execution /executions /plugin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: excluding/including tests in surefire-plugin in different phases
Jan-Olav wrote: Still struggling with this The configuration below runs all my tests in both phases. Nothing is exluded or included :-( As far as I can see, this config is the same as the one recommended on http://maven.apache.org/plugins/maven-surefire-plugin/examples/inclusion -exclusion.html, where inclusion and exclusion patterns are reversed in the two phases. Any insight greatly appreciated. plugin artifactIdmaven-surefire-plugin/artifactId executions execution idintegration-test/id phaseintegration-test/phase configuration excludes exclude**/Test*.java/exclude /excludes includes include **/TestIntegration.java /include /includes /configuration /execution execution idtest/id phasetest/phase configuration includes include**/Test*.java/include /includes excludes exclude **/TestIntegration.java /exclude /excludes /configuration /execution /executions /plugin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Good day to you, Jan-Olav, For the first execution, try removing the excludes part. I think What are the tests you are tryiing to include and excludes? I think surefire plugin processes the includes first, and the excludes second. if so, you would have excluded **/TestIntegration.java as well. As for the second one. If you only want to run Test.java, you can simply do includes include**/Test.java/include /includes And remove the exclude as well :-) Cheers, Franz -- View this message in context: http://www.nabble.com/excluding-including-tests-in-surefire-plugin-in-different-phases-tf2534887s177.html#a7069340 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: excluding/including tests in surefire-plugin in different phases
On 10/29/06, Jan-Olav Eide [EMAIL PROTECTED] wrote: Still struggling with this The configuration below runs all my tests in both phases. Nothing is exluded or included :-( As far as I can see, this config is the same as the one recommended on http://maven.apache.org/plugins/maven-surefire-plugin/examples/inclusion -exclusion.html, where inclusion and exclusion patterns are reversed in the two phases. Any insight greatly appreciated. There is a working example linked from this page: http://docs.codehaus.org/display/MAVENUSER/Maven+and+Integration+Testing It's here: http://svn.apache.org/repos/asf/shale/framework/trunk/shale-apps/shale-usecases/pom.xml Instead of using an execution for the test phase, I do it in the usual buildpluginsplugin section. Then, since that is inherited by the execution for integration-test, I override the exclusion with 'none' and set the include to what I want. Note that my execution is in a profile because I don't want integration tests to run every time I build. HTH, -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: excluding/including tests in surefire-plugin in different phases
Hi, Is there a TestNG mvn plugin? TestNG can do test by a failure style. first run all, and run failures. If not, a testng mvn plugin maybe is good idea. Isn't it? Regards, Qinxian 2006/10/30, franz see [EMAIL PROTECTED]: Jan-Olav wrote: Still struggling with this The configuration below runs all my tests in both phases. Nothing is exluded or included :-( As far as I can see, this config is the same as the one recommended on http://maven.apache.org/plugins/maven-surefire-plugin/examples/inclusion -exclusion.html, where inclusion and exclusion patterns are reversed in the two phases. Any insight greatly appreciated. plugin artifactIdmaven-surefire-plugin/artifactId executions execution idintegration-test/id phaseintegration-test/phase configuration excludes exclude**/Test*.java/exclude /excludes includes include **/TestIntegration.java /include /includes /configuration /execution execution idtest/id phasetest/phase configuration includes include**/Test*.java/include /includes excludes exclude **/TestIntegration.java /exclude /excludes /configuration /execution /executions /plugin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Good day to you, Jan-Olav, For the first execution, try removing the excludes part. I think What are the tests you are tryiing to include and excludes? I think surefire plugin processes the includes first, and the excludes second. if so, you would have excluded **/TestIntegration.java as well. As for the second one. If you only want to run Test.java, you can simply do includes include**/Test.java/include /includes And remove the exclude as well :-) Cheers, Franz -- View this message in context: http://www.nabble.com/excluding-including-tests-in-surefire-plugin-in-different-phases-tf2534887s177.html#a7069340 Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- 向秦贤