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
8
votes
1 answer

Failsafe html reports in Jenkins

I have some integration tests (with Selenium) which are run with failsafe maven plugin. Failsafe generates XML reports files only. 1) I want to generate HTML reports 2) I want to have a link in Jenkins to the html reports For the 1) I installed the…
Clem
  • 121
  • 1
  • 2
  • 4
8
votes
3 answers

How can I use a JUnit RunListener in Eclipse?

I wrote a simple RunListener for JUnit which works quite well with Maven. I could register it for the maven-failsafe-plugin via listener
Rick-Rainer Ludwig
  • 2,371
  • 1
  • 26
  • 42
7
votes
4 answers

failsafe plugin won't run on one project but will run on another -- why?

This is driving me insane. The Maven failsafe plugin will not run on my project. If I run mvn verify only surefire runs. If I type mvn failsafe:verify it fails with the following error: [INFO] Scanning for projects... [INFO] …
Christopher Poile
  • 985
  • 1
  • 11
  • 17
7
votes
2 answers

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

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…
Louis Fellows
  • 544
  • 1
  • 4
  • 12
7
votes
1 answer

Why does Maven warn that failsafe forkCount should not be zero?

I've set forkCount to zero in my maven-failsafe-plugin configuration so that I can easily use mvnDebug and set breakpoints in my tests while debugging. This results in the warning: The parameter forkCount should likely not be 0, not forking a JVM…
tgdavies
  • 10,307
  • 4
  • 35
  • 40
7
votes
1 answer

how to execute only integration test in spring boot using maven

I am trying to separate unit and integration tests through maven command. pom.xml .... org.springframework.boot spring-boot-starter-test
user1298426
  • 3,467
  • 15
  • 50
  • 96
7
votes
3 answers

How can I run integration tests after building all modules in a multi-module Maven project?

I am working on a large multi-module Maven project. Each module has fast unit tests (using the Surefire plugin), many modules have slow integration tests (using the Failsafe plugin). I would like to speed up the feedback for "simple" build failures…
7
votes
1 answer

Maven Failsafe plugin does not find any test cases

I have added the following plugin in the pom.xml org.apache.maven.plugins maven-failsafe-plugin 2.18.1
andreadi
  • 1,953
  • 1
  • 20
  • 35
7
votes
1 answer

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

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",…
daydreamer
  • 87,243
  • 191
  • 450
  • 722
6
votes
1 answer

Java: How to access metafile information from maven failsafe plugin?

I want to access information like implementation version stored in the jar file. This seems to work quite well, in any technique but always based on the classloader. If i want to test in my maven environment, of course i cannot use the surefire…
user2609605
  • 419
  • 2
  • 14
6
votes
1 answer

Failsafe error: "Invalid signature file digest for Manifest main attributes" when using shade plugin

When using shade-plugin in maven and later trying to run integration tests using failsafe-plugin, I get the following error when failsafe is about to run, resulting in my integration tests being skipped: [ERROR] Invalid signature file digest for…
Ludwik
  • 2,247
  • 2
  • 27
  • 45
6
votes
1 answer

Any way to run JUnit 5 integration tests in parallel under failsafe?

Trying revisit running Junit 5 / 4 integration tests under Junit 5 platform (5.3.2) in maven. from How to run a mix of JUnit 4 and JUnit 5 tests in parallel using maven-failsafe-plugin Running unit tests under surefire plugin 2.22.1 works fin in…
6
votes
2 answers

Integration tests wouldn't start (Failsafe, Maven)

I'm trying to use Maven Failsafe Plugin to run my integration tests with this configuration: maven-failsafe-plugin 2.7.1
John Manak
  • 13,328
  • 29
  • 78
  • 119
6
votes
2 answers

Running Spock tests in parallel

My E2E tests are running pretty slowly (25 minutes) as they call a bunch of services and wait for some data to be populated in the database. I want to run it concurrently. I'm using the following maven-failsafe-plugin setup:
6
votes
2 answers

Determining number of CPU cores during a Maven build

I'm currently using the Maven Failsafe Plugin to do forked execution of tests (running multiple in parallel in separate JVMs). I'm manually setting the forkCount variable based on the number of cores my machine has, but I'd like for this to be…
Thom Shutt
  • 449
  • 5
  • 17
1 2
3
24 25