Questions tagged [maven-failsafe-plugin]

The Maven Failsafe Plugin is used to run integration tests with Maven build tools.

The Maven Failsafe Plugin is designed to run integration tests while the Surefire Plugin is designed to run unit tests. The name (failsafe) was chosen both because it is a synonym of surefire and because it implies that when it fails, it does so in a safe way.

This plugin is strictly linked to the following Maven phases: integration-test, verify. However, during its usage, the pre-integration-test and post-integration-test phases are also often used (i.e. set-up and tear-down of an embedded web server).

Check the official usage page for a first look at this plugin.

375 questions
2
votes
0 answers

Maven Failsafe performance?

I've started with Maven Failsafe to implement integration tests properly. Previously I was running all tests with Surefire. Now Failsafe runs those Surefire isn't. When running "mvn clean verify" everything goes well until it's time for Failsafe to…
Jan Goyvaerts
  • 2,913
  • 4
  • 35
  • 48
2
votes
1 answer

exclude TestNG-Groups on maven build in hudson

I want to use hudson to build a maven-java project. Some of my integration tests use servers which are not reachable from the hudson-server. So i want to exclude them using a special profile. hudson
KarlsFriend
  • 745
  • 1
  • 4
  • 17
2
votes
1 answer

Cucumber Integration Test not seen by Maven Failsafe

I've created a Micronaut/Cucumber/JUnit5 test and am trying to run it as an integration test with Maven's Failsafe plugin. When I run it as a normal test, Cucumber works properly. When I change the name of the test to FooIT and run mvn verify,…
2
votes
1 answer

Maven build fails with failsafe plugin

I am trying to build my project and run the test by using junit5 and maven failsafe plugin for integration tests. If I run my test by using mvn failsafe:integration-test it runs all the integration tests. When I run maven install failsafe plugin…
user1474111
  • 1,356
  • 3
  • 23
  • 47
2
votes
0 answers

How to ensure cleanup after a failure in pre-integration-test?

I am trying to set up integration testing in maven (v2) to be executed via Jenkins. I'm bringing up a large software stack (via the exec-maven-plugin) in the pre-integration-test phase of the maven POM. Unfortunately, this bring-up sometimes fails…
2
votes
1 answer

maven failsafe plugin is not reporting cucumber test execution statistics

I am using below library versions in my SpringBoot project and cucumber for integrations tests, Java - 11.0.11 Maven - 3.8.1 SpringBoot - 2.3.12.RELEASE Cucumber - 6.10.4 Junit5 Jupiter - 5.4.0 Failsafe plugin - 3.0.0-M5 Although cucumber feature…
2
votes
1 answer

How to restart Docker container before each test execution with Maven?

I would like to start a fresh postgres docker container before each single test execution, and NOT just once before running all integration tests. The configuration I currently have is like most Google results suggest:
2
votes
1 answer

How to run parallel Cucumber Spring Boot integration tests with Maven (surefire or failsafe)?

Hello folks, I'm developing cucumber tests since january of this year and i'm now facing a problem running cucumber integration tests in parallel with maven (surefire as well as failsafe) in a Spring Boot environment. In a nutshell: I want to run…
2
votes
0 answers

How disable maven-surefire-plugin:2.22.2 (default-test) and able maven-failsafe-plugin?

I need disable surefire (default-test of spring) because I'm course and they did the Integrations-Test through failsafe. org.apache.maven.plugins
2
votes
0 answers

Execute post-integration-test phase when pre-integration-tests fail

During pre-integration-tests Maven phase I'm setting up some tests environment. Let's suppose I'm starting a database and a mock server (in that order) Sometimes, the port of the mock server is already allocated, so my build fails in…
italktothewind
  • 1,950
  • 2
  • 28
  • 55
2
votes
0 answers

Maven Failsafe: Exclude tests which are part of a test suite

I'm using Maven Failsafe to execute integration tests in my project. Therefore I include a class which uses the JUnit Suite feature. Is it possible to exclude tests, which are included in the test suite, through the ? Until now I tried to…
2
votes
1 answer

Maven clean install failed to execute goal maven failsafe plugin with openjdk 11

I am facing issue with maven clean install of project using openjdk 11, which was build successfully by using jdk 8. Showing failed to execute goal maven failsafe plugin, and error occurred in starting fork. [ERROR] Failed to execute goal…
Albin
  • 1,929
  • 2
  • 14
  • 18
2
votes
1 answer

Maven Integration-Test how to set-up POM correctly for different Profiles

I am having problems controlling how Maven copies resource files during the Dev Compile/Test steps and the Integration-Test Compile/Verify steps. I've created two Profiles in Maven, Dev and Integration-Test. I've created a config.properties file for…
2
votes
0 answers

Using the JUnitFlakyTestDataPublisher throws an AbstractMethodError "you must override contributeTestData"

I try to use the rerunFailingTestsCount option to deal with flaky tests. In order to display these in the junit results, I use the flaky test handler plugin which would theoretically deal with displaying flaky tests In my jenkins file this looks…
globalworming
  • 757
  • 1
  • 5
  • 33
2
votes
1 answer

Add two flags in Maven tag to SkipTests

I´m using a ScalaTest plugin to execute some IT test. I need to skip all the test(Unit, IT) in some pipelines, and they only use the flag ${skipTests} so I need to use that flag for all my types of testing. In local sometimes I want just to…
paul
  • 12,873
  • 23
  • 91
  • 153