tkueck
tkueck

Reputation: 53

Maven fail-safe plugin rerunning individual failing tests that are part of a suite

I'm using Maven's failsafe plugin to run integration test suites. The tests themselves are selenium-webdriver tests that use JUnit for the asserts and categories. When I launch an individual test with: mvn clean verify -Dfailsafe.rerunFailingTestsCount=N -Pfunctional-test,env-stage -Denvironment=env-stage -DtestBuildNumber=${testBuildNumber} -Dit.test=TestName -Dwebdriver=${browser} -Dselenium.grid.2.hub=${hub} It will rerun failing tests N times.

However if I launch a test suite with that same command it will not rerun failing tests. Is there some way to get rerunFailingTestsCount to work with suites?

Upvotes: 2

Views: 2341

Answers (1)

František Hartman
František Hartman

Reputation: 15086

What version of failsafe plugin do you use?

Your problem looks like this bug: https://issues.apache.org/jira/browse/SUREFIRE-1152

Option rerunFailingTestsCount silently fails with test suites

After a test failure (with rerunFailingTestsCount > 0), the JUnit4*Provider.executeWithRerun calls execute again with a list of the failing testMethods, but JUnit4*Provider.execute silently fails to find the requested methods.

Should be fixed in 2.19

Upvotes: 1

Related Questions