maven-failsafe-plugin

Maven running jetty on integration-test stage

馋奶兔 提交于 2019-12-13 13:35:47
问题 I use failsafe plugin. So when I type mvn failsafe:integration-test it stars my integration tests (which is great). But I want my jetty server starts on pre-integration stage then. What should I do? (I don't want launch mvn verify since it involves whole cycle running, but mvn failsafe:integration-test - it seems it's supposed to work that way) There are two plugins: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <!-- for starting jetty for

Why failsafe plugin requires both integration-test and verify goals?

南笙酒味 提交于 2019-12-13 13:12:24
问题 I have the next pom.xml <project> ... <plugin> <artifactId>maven-failsafe-plugin</artifactId> <version>2.6</version> <executions> <execution> <id>integration-test</id> <goals> <goal>integration-test</goal> <goal>verify</goal> </goals> <configuration> <argLine>${failsafeArgLine}</argLine> <includes> <include>**/dmg/*IT.java</include> </includes> <skipTests>${skipTests}</skipTests> </configuration> </execution> </executions> </plugin> ... </project> The problem is that when I'm taking off

Does maven sonarqube plugin reads failsafe reports?

拥有回忆 提交于 2019-12-13 03:58:28
问题 I am using 3.6 maven sonar plugin . While seeing with mvn sonar:sonar -X , I did not see sonar searching for failsafe report. (Finding it or not finding it is different thing ) According to this doc , I think it cannot be configured for failsafe reports for integration test. Does mvn sonar:sonar reads failsafe reports ? If yes , how ? I have mentioned these properties in my POM: <sonar.jacoco.reportPath>/Users/xxx/site-order/service/target/jacoco.exec</sonar.jacoco.reportPath> <sonar.jacoco

Getting “Expecting a stackmap frame at branch target” when running Maven integration testing

倖福魔咒の 提交于 2019-12-12 10:37:45
问题 I’m using Maven 3.2.3 with this version of Java davea$ echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home When I run mvn clean install I get errors like the below in my integration tests … testFindSampleUsersByCodeAscByDefault(org.mainco.subco.user.service.SampleUserService2IT) Time elapsed: 2.204 sec <<< ERROR! java.lang.VerifyError: Expecting a stackmap frame at branch target 57 Exception Details: Location: org/mainco/subco/user/service/SampleUserServiceImpl

Jetty 9.3.4 not working with integration tests

﹥>﹥吖頭↗ 提交于 2019-12-12 02:46:25
问题 I'm running integration tests using jersey, jetty 9.x, jetty-maven-plugin and the maven-failsafe-plugin. Integration tests worked well with jetty 9.2.0.M0 specified in jetty-maven-plugin. When using version 9.3.4.RC1, jetty starts, but no integration tests are run. Here's my pom.xml: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

maven-failsafe-plugin does not execute test cases from single class in parallel mode

不打扰是莪最后的温柔 提交于 2019-12-12 02:12:08
问题 I've single test class with multiple test cases, which I would like to execute in parallel mode. I've below setup in pom.xml But instead of executing in parallel mode, test cases are being executed in sequence. Please clarify what may be going wrong here ? <plugin> <artifactId>maven-failsafe-plugin</artifactId> <version>2.18.1</version> <configuration> <forkCount>3</forkCount> <reuseForks>true</reuseForks> </configuration> <executions> <execution> <goals> <goal>integration-test</goal> <goal

Why @AfterClass called after tests from another classes?

半世苍凉 提交于 2019-12-11 04:45:20
问题 I tried to run test cases in determined order but without luck. As I see methods annotated with @AfterClass runs after methods from another test: Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNGMapConfigurator@558ee9d6 RUN class com.example.testng.ITCaseOne.beforeClass() RUN class com.example.testng.ITCaseOne.someCase() RUN class com.example.testng.ITCaseTwo.beforeClass() RUN class com.example.testng.ITCaseTwo.someCase() RUN class com.example.testng.ITCaseOne.anotherCase(

TestNG - Custom reporter listener issue with failsafe plugin

南笙酒味 提交于 2019-12-11 02:20:57
问题 I have a project in which I used maven fail-safe plugin to run the integration tests. I am using the Maven + TestNG framework combination. For the project purpose, earlier I have modified the TestNG's default XML Report to customize the project needs. I implemented the above said requirement in a CustomReporter class which extends the TestNG's IReporter interface. Earlier I used surefire plugin to run these test methods and adding the listener mechanism in the surefire plugin works as

Maven + Surefire/Failsafe - forkMode=“perthread” is not working … a workaround?

你。 提交于 2019-12-11 01:55:29
问题 We are developing an application based in an Embedded Infinispan Data-grid cluster. In the targeted environment of our application, each member of the data-grid will run in a independent JVM and using jgroup the cluster will be formed (this is done by Infinispan actually). For do some automated testing over this data-grid we were working with maven-surefire-plugin (or maven-failsafe-plugin ) with this configuration: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven

Configuring maven-failsafe-plugin to find integration tests not in src/test/java

☆樱花仙子☆ 提交于 2019-12-10 03:26:29
问题 My directory structure is like so: src/integrationTest/java src/test/java src/main/java I am trying to get failsafe to pick-up the integration tests, but failing to do so in the way I would like. I have tried this: <plugin> <artifactId>maven-failsafe-plugin</artifactId> <version>2.17</version> <executions> <execution> <goals> <goal>integration-test</goal> <goal>verify</goal> </goals> </execution> </executions> <configuration> <testSourceDirectory>src/integrationTest/java</testSourceDirectory>