maven-failsafe-plugin

Integration tests wouldn't start (Failsafe, Maven)

*爱你&永不变心* 提交于 2019-12-04 03:24:34
问题 I'm trying to use Maven Failsafe Plugin to run my integration tests with this configuration: <plugin> <artifactId>maven-failsafe-plugin</artifactId> <version>2.7.1</version> <executions> <execution> <id>integration-test</id> <goals> <goal>integration-test</goal> </goals> </execution> <execution> <id>verify</id> <goals> <goal>verify</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty-plugin</artifactId> <version>6.1.7<

maven-failsafe-plugin Errors and BUILD SUCCESS?

删除回忆录丶 提交于 2019-12-03 23:00:48
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 <<< FAILURE! Results : Tests in error: testException(xxxxx.IntegrationTierFunctionalTestCas Tests run:

Using JUnit Categories with Maven Failsafe plugin

情到浓时终转凉″ 提交于 2019-12-03 11:44:07
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.12</version> <executions> <execution> <goals> <goal>integration-test</goal> </goals> </execution> <

Running a JUnit4 Test Suite in Maven using maven-failsafe-plugin

旧时模样 提交于 2019-12-03 07:35:54
I've got a JUnit 4 test suite that contains a number of test classes in the order they need to be run (our Integration tests need to be run in a certain order). If I use the maven-failsafe-plugin without any configuration it will run the test but not in the correct order. However, If I set the plugin to run the test suite no tests are run. Is it possible to run a test suite using the failsafe plugin? if so, where have I gone wrong!! The code is below: @RunWith(Suite.class) @SuiteClasses({ TestCase1.class, TestCase2.class, ... TestCaseN.class, }) public class IntegrationSuite { //Do Nothing. }

Benefits of Maven FailSafe Plugin

Deadly 提交于 2019-12-03 05:34:27
问题 I read Maven Failsafe plugin is designed specifically to run integration tests. Currently I'm working on a multi-module project and integration tests are in its own separate module, written in TestNg and run using Surefire plugin. We don't have conflicts with unit tests since only integration tests are run in the test phase in that module. And to set up the environment before the tests, and clean it after tests are run, @BeforeSuite @AfterSuite TestNg annotations are used. So there's no need

Maven separate Unit Test and Integration Tests

依然范特西╮ 提交于 2019-12-02 16:39:13
UT = Unit Tests IT = Integration Tests. All my Integration test classes are annotated with @Category(IntegrationTest.class) My goal is: mvn clean install => runs UT and not IT mvn clean install -DskipTests=true => no tests are executed mvn clean deploy => runs UT and not IT mvn clean test => runs UT and not IT mvn clean verify => runs UT and IT mvn clean integration-test => runs IT and UT are not executed mvn clean install deploy => runs UT and not IT pom properties: <junit.version>4.12</junit.version> <surefire-plugin.version>2.18.1</surefire-plugin.version> <failsafe-plugin.version>2.18.1<

Maven Surefire plugin: what is meaning of filesystem in runOrder?

拟墨画扇 提交于 2019-12-01 20:00:27
I wanted to know if my integration tests will run in specific order and looked at the maven-failsafe-plugin documentation , which is runOrder : Defines the order the tests will be run in. Supported values are "alphabetical", "reversealphabetical", "random", "hourly" (alphabetical on even hours, reverse alphabetical on odd hours), "failedfirst", "balanced" and "filesystem". Odd/Even for hourly is determined at the time the of scanning the classpath, meaning it could change during a multi-module build. Failed first will run tests that failed on previous run first, as well as new tests for this

maven-failsafe-plugin Failures and BUILD SUCCESS?

∥☆過路亽.° 提交于 2019-12-01 15:13:46
I want to use maven-failsafe-plugin to run some integration tests. If any test fails, I want Maven to fail the build and not BUILD SUCCESS. Tests run: 103, Failures: 1, Errors: 0, Skipped: 26 [INFO] BUILD SUCCESS* how can I configure it, that build not success is? My failsafe plugin is configured as: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>${failsafe.version}</version> <configuration> <systemProperties> <CI_INTEGRATION_OVERRIDE_PATH>${basedir}/..</CI_INTEGRATION_OVERRIDE_PATH> </systemProperties> <includes> <include>**

Merging Integration and Unit test reports with JaCoCo

血红的双手。 提交于 2019-11-30 12:44:26
问题 I am generating failsafe and surefire reports with maven with the JaCoCo plugin, but I can only manage to get them in separate reports. I would like to have a overall coverage view (merge between both Unit Tests and Integration Tests) as well. After what I think was a thorough google search I could only found a way to do this with Sonar. Is there any simpler way to do this? Related question: Maven separate Unit Test and Integration Tests 回答1: You should take a look into the documentation of

In Maven is it possible to keep integration tests in a separate folder from unit tests?

只愿长相守 提交于 2019-11-30 10:57:36
On the Maven and Integration Testing page it says: The Future Rumor has it that a future version of Maven will support something like src/it/java in the integration-test phase, in addition to src/test/java in the test phase. but that was back in 2011-12-11. Has this happened yet? In this answer to "Run maven test not in default src/test/java folder" it mentions setting the <testSourceDirectory> , is their some way of doing this just for integration test (ie. the integration-test phase)? I'm looking to use the Maven FailSafe plugin and avoid renaming a bunch of integration tests or using the