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
2 answers

Running cucumber-jvm tests in embedded tomcat 404 problems

So ive been following the following guide as to how to get maven tomcat7 and cucumber up and running together to run my integration tests. Integration tests with maven and tomcat When I run mvn clean install my tests comeback with a 404 not found…
0
votes
1 answer

DropwizardAppRule and maven-failsafe-plugin

This is my DropwizardAppRule in MyAppIT.java class: @ClassRule public static final DropwizardAppRule RULE = new DropwizardAppRule<>(MyApplication.class, YAML_PATH); This would return the LocalPort my local Dropwizard App is…
danksim
  • 617
  • 3
  • 9
  • 27
0
votes
2 answers

Maven war packaging skipped prior to tests being run

I have a maven project which has some Selenium based integration tests to run in a package called sit. I have configured the failsafe plugin to include test files in the package eg. sit/**/*Test.java. I am trying to run mvn clean…
0
votes
0 answers

Jacoco and jetty maven plugin gets 0% coverage in SonarQube

I am trying to get the IT coverage report in my project using jacoco & Jetty. I'm running my integration tests against jetty (using the maven plugin). I have done the setup. Here is my POM quality-check
0
votes
1 answer

How to skip cucumber tests with parsing error in maven?

I run my cucumber tests by using mvn integration-test. If my test directory contains test which ends with Error parsing feature file, my next tests do not run at all. I've got 4 .feature files, one of them contain invalid step (not parsed). If I…
0
votes
0 answers

Maven dependencies sharing class loader

I have a 3 maven projects with different groupIds/ArtifactIDs. Project A has depedencies on projects B and C. and I'm using maven-failsafe-plugin in order to run B's and C's integration tests from A during build: (In project A) :
orepor
  • 905
  • 2
  • 13
  • 23
0
votes
2 answers

Why don't my integration tests run while invoking the "mvn test" command?

Currently my integration tests only run when I run mvn install. I would like to have them run when I do mvn test. My section contains: ...
Gabriel Petrovay
  • 20,476
  • 22
  • 97
  • 168
0
votes
1 answer

maven failsafe testng is not printing any sysouts or summaries

I am using TestNG and maven failsafe for my integration tests. The tests are executed and they pass however there are absolutely no details printed out. I even created a dummy test and have System.out.println in that and none of that is printed…
SK176H
  • 1,319
  • 3
  • 14
  • 25
0
votes
0 answers

WebApplicationContext null in integration test

I wrote integration tests using Spring and JUnit. I added a @Before method to setup the mockMvc. The code looks like this: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = AppConfig.class, loader =…
Hans Leautaud
  • 1,742
  • 1
  • 19
  • 34
0
votes
1 answer

Selenium test can be started via maven only. Fails with NullPointer when starting using TestNG xml file (because system variable is 'null')

The issue is the following - if I launch my autotests via maven(from command prompt OR eclipse), then they run without issues. If I try to launch via testng.xml(from eclipse), then my tests fail with NullPointerException. Basically here is my…
0
votes
1 answer

How do I turn off 1-line error reporting in Failsafe?

I dislike this feature: https://maven.apache.org/surefire/maven-failsafe-plugin/newerrorsummary.html Is there a way to turn it off so it reports full stack traces and errors?
Daniel Kaplan
  • 62,768
  • 50
  • 234
  • 356
0
votes
1 answer

Maven failsafe plugin does not influence building

Maven build process finishes with success even though that integration test fails. Why does it happen? I use Maven failsafe plugin Here is the output of the log: Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.235 sec <<< FA ILURE!…
Michal
  • 610
  • 10
  • 24
0
votes
1 answer

How do I prevent Maven from assmebling my WAR if my integration tests fail?

I’m using Maven 3.3.3 with Java 8 on Mac Yosemite. I have a bunch of integration tests and I have my failsafe plugin (v 2.18.1) set up as such … org.apache.maven.plugins
Dave
  • 15,639
  • 133
  • 442
  • 830
0
votes
0 answers

Maven failsafe run Fitnesse tests

I need to run some Fitnesse tests on the maven integration phase, when I do mvn clean verify the Fitnesse tests are executed but after the execution I get this: Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.723 sec - in…
jordiPons
  • 164
  • 5
  • 21
0
votes
1 answer

Jetty 9.3.4 not working with integration tests

I'm running integration tests using jersey, jetty 9.x, jetty-maven-plugin and the maven-failsafe-plugin. Integration tests worked well with jetty 9.2.0.M0 specified in jetty-maven-plugin. When using version 9.3.4.RC1, jetty starts, but no…
user1434045
  • 160
  • 1
  • 8