failsafe plugin error with suiteXml
hi, i am using maven failsafe plugin to run the integration tests however, i am getting following error when i am executing integration tests along with cobertura execute goal mvn-failsafe-plugin: (failsafe-integration-tests) project x: suiteXmlFiles is configured, but there is no TestNG dependency http://stackoverflow.com/questions/26233462/execute-goal-mvn-failsafe-plugin-failsafe-integration-tests-project-x-suitex can some one please suggest what could be the error i have added TestNG dependnecy at every possible location in pom file still the issue please please suggest regards
Re: failsafe plugin error with suiteXml
please suggest .. i am really stuck regards On Tue, Oct 7, 2014 at 10:51 PM, Irfan Sayed irfu.sa...@gmail.com wrote: hi, i am using maven failsafe plugin to run the integration tests however, i am getting following error when i am executing integration tests along with cobertura execute goal mvn-failsafe-plugin: (failsafe-integration-tests) project x: suiteXmlFiles is configured, but there is no TestNG dependency http://stackoverflow.com/questions/26233462/execute-goal-mvn-failsafe-plugin-failsafe-integration-tests-project-x-suitex can some one please suggest what could be the error i have added TestNG dependnecy at every possible location in pom file still the issue please please suggest regards
Surefire plugin report all successfull sub tests.
Hi Colleagues, Is there a possibility the surefire-plugin to count all successful subtest(verify statements) for Junit tests. Here is the describing of the problem: Imagine you have two tests, with each having 5 verify statements If both tests succeed, the test result will show two tests which passed successfully If only one test succeeds and the other test fails completely, the result (e.g. in Jenkins) will show one test succeeded and 5 tests failed, which leads to a success rate of ~17%, while in fact the success rate is 50% (5 verify statements of the succeeded test are only reported as one success). Thanks and regards, Mihail Chalashkanov
Best practice for integration tests (vs unit tests)
Right now I have an overlap of unit and integration tests and I want to tear out my integration tests and keep them separate. This way our unit tests execute fast and integration testing takes a bit longer. … and now I’m trying to figure out the best strategy for that. Reading this: http://docs.codehaus.org/display/MAVENUSER/Maven+and+Integration+Testing seems to not solve the problem. Seems to me the easiest would be to just have src/main/integration-tests … but would I have to use failsafe or surefire? I’m not sure why I would need another plugin for this. Maybe someone can enlightenment me with some maven wisdom? -- Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com … or check out my Google+ profile https://plus.google.com/102718274791889610666/posts http://spinn3r.com
Re: Best practice for integration tests (vs unit tests)
Hi Kevin, the best suggestion i can give is simply make a separate module where the integration tests should be moved to... This has the advantage having different location for them, cause they are more than unit tests which is expressed by using a separate module furthermore you have the configuration for the integration test within a separate module which is more flexible this includes the configuration of maven-failsafe-plugin as well. maven-failsafe-plugin should be used cause it supports a different naming schema for your integration tests (*IT.java see docs of maven-failsafe-plugin) and you can check the results of the integration tests via maven-failsafe-plugin:verify separately...and break the build if you like... Apart from the above integration tests should run at an other phase (pre-integration-test,integration-test, post-integration) and NOT in test phase...which is handled by maven-failsafe-plugin (see docs http://maven.apache.org/surefire/maven-failsafe-plugin/usage.html) So if you like to run your unit tests parallel you can configure the maven-surefire-plugin which does not influence your integration tests... I would also suggest to put the integration tests into src/test/java within the separated module Kind regards Karl-Heinz Marbaise On 10/8/14 1:28 AM, Kevin Burton wrote: Right now I have an overlap of unit and integration tests and I want to tear out my integration tests and keep them separate. This way our unit tests execute fast and integration testing takes a bit longer. … and now I’m trying to figure out the best strategy for that. Reading this: http://docs.codehaus.org/display/MAVENUSER/Maven+and+Integration+Testing seems to not solve the problem. Seems to me the easiest would be to just have src/main/integration-tests … but would I have to use failsafe or surefire? I’m not sure why I would need another plugin for this. Maybe someone can enlightenment me with some maven wisdom? - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: [maven] Best practice for integration tests (vs unit tests)
-Original Message- From: Kevin Burton Sent: Tuesday, October 07, 2014 19:28 Right now I have an overlap of unit and integration tests and I want to tear out my integration tests and keep them separate. This way our unit tests execute fast and integration testing takes a bit longer. . and now I'm trying to figure out the best strategy for that. Reading this: http://docs.codehaus.org/display/MAVENUSER/Maven+and+Integration+Testing seems to not solve the problem. Try: http://stackoverflow.com/questions/1399240/how-do-i-get-my-maven-integration-tests-to-run Seems to me the easiest would be to just have src/main/integration-tests . but would I have to use failsafe or surefire? I'm not sure why I would need another plugin for this. Maybe someone can enlightenment me with some maven wisdom? This may not be in line with what you are looking for, but we typically move our integration tests to a separate pom.xml which has the primary pom as a dependency. -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100- - +1 (443) 269-1555 x333Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Running integration tests
Thank you Stephen - this was very useful and came just when I am ready to start piecing together this level of detail. 1) Default vs non-default plugins suddenly a White Rabbit with pink eyes ran close by Alice So, what I understood from this trip down the rabbit-hole. - Maven defines various lifecycles. - Each lifecycle defines a list of phases. - Each phase will execute a list of goals (defined in plugins). - What specific goals get executed in each phase depends on the packaging defined for the pom.xml. Generally package defines what sort of artifact you are dealing with: jar, war, ear etc. - I am using ear packaging, so it binds the surefire:test goal to the test phase, but binds nothing to integration-test - which is why I need to add the failsafe plugin to my pom.xml. I didn't need to define a phase for it, because failsafe's default phase is integration-test. 2) Just run integration tests? I can see that unit tests are all classes with names like *Test.java and integration tests are all classes with names like IT.java. But mvn verify and mvn test seem to run all tests (unit and integrations). Is there a way to run just one or the other? So, going from the previous trip down the rabbit hole, I understand that when I run mvn verify I was seeing unit tests and integration tests being run because in order to get to the verify phase (where my integration tests should run from), it was running every phase before that - including the test phase (where unit tests are run). tweaking of http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#skipTests should get you there! When I was running mvn test, I was also seeing integration tests being run because I had named my integration test classes TestBlahBlahIt.java so they were being picked up by both the test and integration-test phases. So, I should more strictly follow the convention of - unit tests being Test*.java - and NOT including IT at the end. - integration tests being *.IT.java - and NOT starting with Test. 3) Run integration tests after compile? The real reason for question 2 is that I wish to run integration tests only after I have deployed the new application to ensure the integration tests run on the server with the new content. Is there a way to do this? Sounds like you should consult my answer to a related question: http://stackoverflow.com/questions/16935290/maven-deploy-webapp-to-tomcat-before-junit-test/16936585#16936585 OK, this was very helpful too. In this case, I am working with a multi-module project and I decided it was best to add our selenium tests in a new project to keep them away from other project code. We have 13 pom.xml files, not counting the one I am adding. So this is my next challenge, to ensure I get this project executing after the others have done their job and deployed to the app server. Why, sometimes I've believed as many as five impossible things before after-noon tea. Time for one more before I knock off at 5pm. Rob :) - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: WAR contains SNAPSHOT JARs with timestamps
I tried adding the following, but couldn't get it to work. Timestamp was appended to the SNAPSHOT jars. {code} plugin groupIdorg.apache.maven.plugins/groupId artifactIdmaven-war-plugin/artifactId version2.4/version configuration outputFileNameMapping@{artifactId}@-@{baseVersion}@.@{extension}@/outputFileNameMapping /configuration /plugin {/code} -- View this message in context: http://maven.40175.n5.nabble.com/WAR-contains-SNAPSHOT-JARs-with-timestamps-tp5807695p5808036.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Running integration tests
You got it Robert.. Robert Mark Bram wrote on 07.10.2014 19:59: OK, this was very helpful too. In this case, I am working with a multi-module project and I decided it was best to add our selenium tests in a new project to keep them away from other project code. We have 13 pom.xml files, not counting the one I am adding. So this is my next challenge, to ensure I get this project executing after the others have done their job and deployed to the app server. In order to make that happen you test module just has to declare a dependency to the ear or whatever is the final output that will be deployed and tested in the module. The reactor (e.g. multi module support in Maven) will then do the right thing. manfred - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org