maven-failsafe-plugin

Maven Failsafe plugin - SurefireBooterForkException: There was an error in the forked process (TypeNotPresentExceptionProxy)

和自甴很熟 提交于 2020-06-24 08:24:33
问题 I get this strange stacktrace when running mvn clean verify -P P1 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.21.0:verify (default) on project prj-name: There are test failures. [ERROR] [ERROR] Please refer to C:\path\to\project\target\failsafe-reports for the individual test results. [ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream. [ERROR] org.apache.maven.surefire.booter

Using the JUnitFlakyTestDataPublisher throws an AbstractMethodError “you must override contributeTestData”

我怕爱的太早我们不能终老 提交于 2020-05-30 06:31:36
问题 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 like pipeline { stages { stage('tests') { steps{ // sh mvn verify here } post { always { junit testResults: 'target/failsafe-reports/**/*.xml', testDataPublishers: [[$class: 'JUnitFlakyTestDataPublisher']] } } } } } the test run fine, flaky ones are

Using the JUnitFlakyTestDataPublisher throws an AbstractMethodError “you must override contributeTestData”

允我心安 提交于 2020-05-30 06:31:25
问题 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 like pipeline { stages { stage('tests') { steps{ // sh mvn verify here } post { always { junit testResults: 'target/failsafe-reports/**/*.xml', testDataPublishers: [[$class: 'JUnitFlakyTestDataPublisher']] } } } } } the test run fine, flaky ones are

Why doesn't “mvn verify” run my integration tests?

守給你的承諾、 提交于 2020-01-13 08:12:00
问题 I have a multi-module project and I have failsafe defined in the root pom like this: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>2.19</version> <configuration> <includes> <include>**/*IntegrationTest.java</include> <include>**/*JourneyTest.java</include> <include>**/*CucumberFeatureTest.java</include> </includes> </configuration> <executions> <execution> <goals> <goal>integration-test</goal> <goal>verify</goal> </goals> <

Why doesn't “mvn verify” run my integration tests?

风流意气都作罢 提交于 2020-01-13 08:11:05
问题 I have a multi-module project and I have failsafe defined in the root pom like this: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>2.19</version> <configuration> <includes> <include>**/*IntegrationTest.java</include> <include>**/*JourneyTest.java</include> <include>**/*CucumberFeatureTest.java</include> </includes> </configuration> <executions> <execution> <goals> <goal>integration-test</goal> <goal>verify</goal> </goals> <

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

痴心易碎 提交于 2020-01-07 03:08:23
问题 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? 回答1: Add this to the surefire/failsafe configuration element: <trimStackTrace>false</trimStackTrace> 来源: https://stackoverflow.com/questions/33927267/how-do-i-turn-off-1-line-error-reporting-in-failsafe

Integration tests who download files

浪尽此生 提交于 2020-01-06 06:09:03
问题 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 file. Web app behaves correctly when test downloads expected data. I read this and I found it very inspiring but is that response valid when you build the file you want to download? 回答1: There are several approaches you can take. In order from best

I have a multi-module Maven 2 POM that has two WARs, how can I configure it to deploy both wars prior to running tests?

試著忘記壹切 提交于 2020-01-04 15:30:40
问题 Roughly, I have (say) project A, pom packaging, that have two module M1 and M2 (say) each of which have war packaging. M2 has integration tests, but the M2 war makes service calls to the war of M1. This should really: Load same data into the DB. Deploy M1's WAR. Deploy M2's WAR. Run M2's IT tests. Undeploy M1 and M2. 回答1: I would use something like the db maintain maven plugin for the database deployment and the maven wagon plugin to deploy the war files into the container. You will have to

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

独自空忆成欢 提交于 2019-12-31 00:57:50
问题 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", "reversealphabetical", "random", "hourly" (alphabetical on even hours, reverse alphabetical on odd hours), "failedfirst", "balanced" and "filesystem". Odd/Even for hourly is determined at the time the of scanning the classpath, meaning it could change during a multi-module

maven-failsafe-plugin Failures and BUILD SUCCESS?

十年热恋 提交于 2019-12-30 16:51:47
问题 I want to use maven-failsafe-plugin to run some integration tests. If any test fails, I want Maven to fail the build and not BUILD SUCCESS. Tests run: 103, Failures: 1, Errors: 0, Skipped: 26 [INFO] BUILD SUCCESS* how can I configure it, that build not success is? My failsafe plugin is configured as: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>${failsafe.version}</version> <configuration> <systemProperties> <CI_INTEGRATION