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

failsafe plugin does not pick the test classes even though I have the correct naming convention *IT.java

I have searched on the internet as well, but I could not find the exact problem that I am having. TO explain what I am doing, I am writing selenium UI tests. I am trying to execute the test using the failsafe plugin. I am executing the maven command…
nzhmz
  • 259
  • 1
  • 2
  • 9
2
votes
0 answers

Inject deployed context into Integration test

I am running JUnit integration tests using maven-failsafe-plugin. I have created a profile which : a. install TomEE b. build project war c. deploy it on TomEE d. start server instance Above works fine, however I want to inject the deployed context…
2
votes
2 answers

Maven cargo plugin with Surefire + Jacoco report

I have a project that fires up tomcat using the cargo plugin and then runs integration tests against that tomcat instance. My goal is get integration test coverage reports of the code that runs in tomcat (not coverage of my integration tests). The…
2
votes
1 answer

Maven failsafe doesn't read environmentVariables config for integration tests

My Maven build comprises of unit and integrations test executions as 2 separate profiles with Jacoco for code-coverage. I am having couple of problems with failsafe plugin and require a direction to look for resolutions. I've already snailed…
DeludedPsyche
  • 131
  • 1
  • 2
  • 13
2
votes
2 answers

Maven failsafe does not run tests in submodule

I have a project with a parent directory containing the following in its pom.xml: org.apache.maven.plugins maven-failsafe-plugin 2.20.1
Peter
  • 2,919
  • 1
  • 16
  • 35
2
votes
1 answer

Setting up steps and attachments

I am trying to setup allure2 for our integration tests, but somethings are not going well. The TestNG listener is working fine, since the allure-results folder is being filled up. The annotations like @Step and @Attachment do not work. The same…
bbnkttp
  • 264
  • 1
  • 11
2
votes
0 answers

Integration test after deploy with fail-safe plugin

How would you run integration test separately after deploy is done. In jenkins we will build, unit test, run some kind of embedded integration tests. Then it will deploy to remote server. How can I run Integration tests against remote deployed…
2
votes
1 answer

Maven build succeeds after cucumber test fails

I have a Cucumber test which fails. After this I suspected my maven build to fail, but this still succeeds. I made a separate cucumbertest profile to run my cucumbertests. here is (part) of my project POM.
Bgvv1983
  • 1,256
  • 1
  • 13
  • 27
2
votes
1 answer

Can I run post processing on my maven integration test results if there are test failures?

I want to extend a maven2 POM to run some post processing on my integration test results. I added a java:exec plugin and bound it to the post-integration-test phase. All is fine when the tests pass but if I get any test failures then the post…
Dave Patterson
  • 1,357
  • 1
  • 11
  • 16
2
votes
1 answer

How do I run Maven integration tests in alphabetical order?

I'm using Maven 3.3.3 with Java 1.8. How do I get my integration tests to run in alphabetaical order, by class name (or file, whatever's easier)? I thought "runOrder" might help me so I created this plugin configuration ...
Dave
  • 15,639
  • 133
  • 442
  • 830
2
votes
2 answers

Maven failsafe plugin not firing integration test

Could not understand this is happening. When I run, mvn failsafe:integration-test it fires my integration tests (test ending with ***IT.java) as first. Then, when I execute immediately the same command, it says "No tests to run". Any help of…
Vis
  • 43
  • 2
  • 9
2
votes
0 answers

Integration test report with failsafe and jacoco shows 0% coverage

Goal:Use failsafe and jacoco,the two plugins to create integration test report. Issue:The report expected is created but it shows that coverage is 0%. report html Here goes the code in pom.xml about jacoco.
2
votes
1 answer

How to run TestNG suite with failsafe without unpacking dependency jar?

I'd like to execute integration tests using a TestNG suite file which is contained in a dependency jar. The details of setting up the pom.xml are discussed here Here's the pom file I currently have. The problem is with the part where I need to…
mac
  • 2,672
  • 4
  • 31
  • 43
2
votes
1 answer

how to add pre and post integration phase to maven-failsafe-plugin

I am having a netty application server need to be started at the pre-integration-test phase and stop it during the post-integration-test phase for the testing purpose of IntegrationTests. I had used maven-failsafe-plugin. But i don't know to execute…
Kgn
  • 231
  • 3
  • 14