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

Integration tests who download files

I am developing a web app who does some work, pack the data in a file and gives you back that file (Content-Type: application/force-download). Right now I am implementing some integration tests, where I ask for data and web app gives me back the…
Francesco
  • 1,742
  • 5
  • 44
  • 78
0
votes
1 answer

Eclipse executes integration tests, but Maven does not

Our Maven build has lots of unit tests in "src/test/java" (named "*Test.java") that work fine from Eclipse and from the maven build. We also have a bunch of integration tests in "src/test/java" (named "*IT.java") that work fine from Eclipse, but we…
David M. Karr
  • 14,317
  • 20
  • 94
  • 199
0
votes
1 answer

How to pass paramenters (cucumber tags) from maven/java runtime to cucumber-jvm-parallel-plugin, preferably using Maven Profiles

For Java based mobile automation framework development using Cucumber-JVM. We use cucumber-jvm-parallel-plugin for Cucumber-runners & passing cucumber tags. Snippet: com.github.temyers
0
votes
1 answer

maven2 - why failesafe plugin is ignoring my junit annotations?

I have set up a java/maven project in order to perform tests this way: unit tests are executed with the surefire plugin integration tests are executed with the failsafe plugin here is the POM (ugly compact formating):
Guillaume
  • 5,488
  • 11
  • 47
  • 83
0
votes
1 answer

Jenkins runs Failsafe Integration Tests despite of -DskipITs

I got a maven multi module project and for one module im using Integration Tests against my local database. We use Jenkins and of course I don't want the ITs to run on Jenkins because of the required database. I found the solution to use…
Vortilion
  • 406
  • 2
  • 6
  • 24
0
votes
1 answer

Maven Testing - How can I get current Maven Settings from Java

I'm building integration testing for a WCC-Component in Maven. In mavens pom.xml I have a plugin configured too: Build the component deploy the component enable the component restart the component Once that is complete I'm working on Getting the…
Raystorm
  • 6,180
  • 4
  • 35
  • 62
0
votes
1 answer

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

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 /…
vikramvi
  • 3,312
  • 10
  • 45
  • 68
0
votes
1 answer

Finding annotated methods in application code from maven integration test

I have a custom annotation in my program that I apply to methods. I would like to find all methods with a particular annotation. From my application code, I can use the Reflections package to do so: new Reflections( new…
Ray
  • 1,769
  • 1
  • 17
  • 22
0
votes
2 answers

Maven integration-test phase not binding to Failsafe

Primary Goal To use command line to both compile and run integration tests in two peer modules of a multi-module repository following Maven's Standard Directory Layout: module     |_src     |____it          integration-test…
0
votes
1 answer

Running a certain test last using maven

I am using Maven and the failsafe plugin to execute a set of runners that run integration tests. One of these runners execute tests that involve altering my configuration. For this reason, I would like this runner to be executed only when the other…
Ogen
  • 6,499
  • 7
  • 58
  • 124
0
votes
0 answers

Does mvn verify executes all integration test classes suffixed with *IT.java

According to the maven failsafe plugin documentation http://maven.apache.org/surefire/maven-failsafe-plugin/ mvn verify should execute all the integration test class files but it looks like it is not doing so. The unit tests does get executed but…
Nital
  • 5,784
  • 26
  • 103
  • 195
0
votes
1 answer

Is it possible to run in parallel mode integration tests written in Spock Framework for Spring Boot

Base Spock specification is: @SpringBootTest(classes = ApplicationTestConfig.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @TestPropertySource("/application.properties") abstract class SpringBootTestSpecification extends…
0
votes
2 answers

Why are integration tests not executed by default in a maven build (install)?

To my understanding, by default (that means without any explicit configuration of the failsafe plugin), maven should run integration tests when the goal "install" is executed. See…
Gustave
  • 3,359
  • 4
  • 31
  • 64
0
votes
2 answers

Maven surefire plugin triggers the testsuite more than once

I have two test-suites say A.xml and B.xml. Here's an example of one of them.
0
votes
1 answer

maven-failsafe-plugin does not execute test cases from single class in parallel mode

I've single test class with multiple test cases, which I would like to execute in parallel mode. I've below setup in pom.xml But instead of executing in parallel mode, test cases are being executed in sequence. Please clarify what may be going wrong…
vikramvi
  • 3,312
  • 10
  • 45
  • 68