maven-failsafe-plugin

Using JUnit Categories with Maven Failsafe plugin

大兔子大兔子 提交于 2019-12-09 08:57:36
问题 I'm using JUnit Categories to separate integration tests from unit tests. The Surefire plugin configuration works - it skips the tests annotated with my marker interface IntegrationTest. However, the Failsafe plugin doesn't pick the integration tests. I've even tried to specify the junit47 provider, but zero tests are run in the integration-test phase. Here is the pom.xml fragment: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>2

Maven - Add Integration Tests

家住魔仙堡 提交于 2019-12-07 13:09:59
问题 trying to split my tests in a Maven build into Unit & Integration tests. I am using the failsafe plugin to run the Integration Tests and attempting to use the build-helper-maven-plugin to add the Integration Tests from the src/it/java directory. I am getting an error when I attempt to do the build and I can't see the reason, the path to my Integration Test source looks to be correct from the root folder of the module. [ERROR] Failed to execute goal org.codehaus.mojo:build-helper-maven-plugin

How can I use a JUnit RunListener in Eclipse?

只愿长相守 提交于 2019-12-07 00:44:09
问题 I wrote a simple RunListener for JUnit which works quite well with Maven. I could register it for the maven-failsafe-plugin via <properties> <property> <name>listener</name> <value>com.asml.lcp.middleware.common.jboss.test.tps.TestDocumentationListener</value> </property> </properties> and see the correct output from the listener. Now I want to register the same RunListener in Eclipse to see the same output there, when I run the tests. Is this possible? For testing purposes and to be

Parallel execution of features files : maven-failsafe-plugin vs cucumber-jvm-parallel-plugin

那年仲夏 提交于 2019-12-06 15:27:21
问题 Currently I'm using maven-failsafe-plugin to run multiple feature files in parallel with Selenium Grid + nodes ( all running in docker containers ) I'm basic questions as below when to use cucumber-jvm-parallel-plugin ? what benefits / disadvantages of cucumber-jvm-parallel-plugin over maven-failsafe-plugin parallel execution ? Thanks in advance. 回答1: Below is the answer "A common approach for running Cucumber features in parallel is to create a suite of Cucumber runners, one for each suite

Maven - Add Integration Tests

我怕爱的太早我们不能终老 提交于 2019-12-05 21:01:23
trying to split my tests in a Maven build into Unit & Integration tests. I am using the failsafe plugin to run the Integration Tests and attempting to use the build-helper-maven-plugin to add the Integration Tests from the src/it/java directory. I am getting an error when I attempt to do the build and I can't see the reason, the path to my Integration Test source looks to be correct from the root folder of the module. [ERROR] Failed to execute goal org.codehaus.mojo:build-helper-maven-plugin:3.0.0:add-test-source (add-test-resource) on project XXXX: The parameters 'sources' for goal org

maven-failsafe-plugin Errors and BUILD SUCCESS?

橙三吉。 提交于 2019-12-05 10:46:32
问题 my question is very similar to this one: maven-failsafe-plugin Failures and BUILD SUCCESS? and I manage to set up failsafe plugin to fail if tests fail. But if test goes into error state, failsafe plugin still does not break the build. ................. ------------------------------------------------------- T E S T S ------------------------------------------------------- Running xxxxx.IntegrationTierFunctionalTestCase Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.054 sec

How can I use a JUnit RunListener in Eclipse?

青春壹個敷衍的年華 提交于 2019-12-05 05:19:31
I wrote a simple RunListener for JUnit which works quite well with Maven. I could register it for the maven-failsafe-plugin via <properties> <property> <name>listener</name> <value>com.asml.lcp.middleware.common.jboss.test.tps.TestDocumentationListener</value> </property> </properties> and see the correct output from the listener. Now I want to register the same RunListener in Eclipse to see the same output there, when I run the tests. Is this possible? For testing purposes and to be consistent it would be nice to have the same output. John Henckel Yes, it is possible. Basically you have to

Problem running tests with enabled preview features in surefire and failsafe

时光毁灭记忆、已成空白 提交于 2019-12-05 02:21:17
I'm trying to migrate a project to Java 12, with --enable-preview . I added --enable-preview in compiler settings: <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.0</version> <configuration> <release>12</release> <compilerArgs> <arg>--enable-preview</arg> </compilerArgs> </configuration> </plugin> And also added it in argLine for surefire and failsafe: <properties> <argLine>--enable-preview</argLine> </properties> And do a mvn clean verify results in: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M3:test (default-test) on project

How do I run JUnit 5 integration tests with the Maven Failsafe plugin?

走远了吗. 提交于 2019-12-04 23:48:52
The Maven Failsafe plugin won't find my JUnit 5 integration tests when I'm running the command mvn clean failsafe:integration-test , although it can find the files. I have the junit-jupiter-api and junit-jupiter-engine as test dependencies: <properties> <junit.jupiter.version>5.0.1</junit.jupiter.version> </properties> <dependencies> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-api</artifactId> <version>${junit.jupiter.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-engine<

Parallel execution of features files : maven-failsafe-plugin vs cucumber-jvm-parallel-plugin

谁都会走 提交于 2019-12-04 21:25:09
Currently I'm using maven-failsafe-plugin to run multiple feature files in parallel with Selenium Grid + nodes ( all running in docker containers ) I'm basic questions as below when to use cucumber-jvm-parallel-plugin ? what benefits / disadvantages of cucumber-jvm-parallel-plugin over maven-failsafe-plugin parallel execution ? Thanks in advance. Below is the answer "A common approach for running Cucumber features in parallel is to create a suite of Cucumber runners, one for each suite of tests you wish to run in parallel. For maximum parallelism, there should be a runner per feature file.