-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Unable to use surefire maven plugin to rerun failing tests #1120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This was referenced May 10, 2017
mpkorstanje
added a commit
that referenced
this issue
May 25, 2017
…e tests. Surefire currently uses a tuple of (Class, Method) to identify failed tests. Cucumber-jvm uses test suites which do not consist of Classes or methods. Therefore another method is needed. JUnit provides the option to select tests that match a Description. Descriptions are compared using a unique Id. To identify tests between different runs we should provide Descriptions with a predictable unique id. The current implementation did not suffice. While the provided cucumber elements are unique, they are not predictable between runs making it impossible to use their descriptions to rerun a failed test. After this change it will be possible to update Surefire to use descriptions to rerun failed tests. Related Issues: - https://issues.apache.org/jira/browse/SUREFIRE-1372 - #1120 - temyers/cucumber-jvm-parallel-plugin#31 (cherry picked from commit 4cc4439)
mpkorstanje
added a commit
that referenced
this issue
May 25, 2017
Rerunning failed tests with Surefire requires a method to identify the tests. Surefire currently uses a tuple of (Class, Method) to identify failed tests. Cucumber-jvm uses test suites which do not consist of Classes or methods. Therefore another method is needed. JUnit provides the option to select tests that match a Description. Descriptions are compared using an unique Id. To identify tests between different runs we should provide Descriptions with a predictable unique id. The current implementation did not suffice. While the provided cucumber elements are unique, they are not predictable. Each run would create a new instance of the identifier making it impossible to use their descriptions to rerun a failed test. After this change it will be possible to update Surefire to use descriptions to rerun failed tests. Related Issues: - https://issues.apache.org/jira/browse/SUREFIRE-1372 - #1120 - temyers/cucumber-jvm-parallel-plugin#31
5 tasks
mpkorstanje
added a commit
that referenced
this issue
May 26, 2017
Rerunning failed tests with Surefire requires a method to identify the tests. Surefire currently uses a tuple of (Class, Method) to identify failed tests. Cucumber-jvm uses test suites which do not consist of Classes or methods. Therefore another method is needed. JUnit provides the option to select tests that match a Description. Descriptions are compared using an unique Id. To identify tests between different runs we should provide Descriptions with a predictable unique id. The current implementation did not suffice. While the provided cucumber elements are unique, they are not predictable. Each run would create a new instance of the identifier making it impossible to use their descriptions to rerun a failed test. After this change it will be possible to update Surefire to use descriptions to rerun failed tests. Related Issues: - https://issues.apache.org/jira/browse/SUREFIRE-1372 - #1120 - temyers/cucumber-jvm-parallel-plugin#31
mpkorstanje
added a commit
that referenced
this issue
May 26, 2017
Rerunning failed tests with Surefire requires a method to identify the tests. Surefire currently uses a tuple of (Class, Method) to identify failed tests. Cucumber-jvm uses test suites which do not consist of Classes or methods. Therefore another method is needed. JUnit provides the option to select tests that match a Description. Descriptions are compared using an unique Id. To identify tests between different runs we should provide Descriptions with a predictable unique id. The current implementation did not suffice. While the provided cucumber elements are unique, they are not predictable. Each run would create a new instance of the identifier making it impossible to use their descriptions to rerun a failed test. After this change it will be possible to update Surefire to use descriptions to rerun failed tests. Related Issues: - https://issues.apache.org/jira/browse/SUREFIRE-1372 - #1120 - temyers/cucumber-jvm-parallel-plugin#31
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Summary
Using surefire to rerun failing tests results in a stack trace.
Expected Behavior
When using surefire with
mvn -Dfailsafe.rerunFailingTestsCount=2 test
I expect the failing tests to be rerun.Current Behavior
Possible Solution
Surefire parses the test description for the class to rerun and expects a class name here rather then a human readable name. Either provide a class name or help convince the surefire folks to fix this this. :)
See: SUREFIRE-1372
Steps to Reproduce (for bugs)
@RunWith(Cucumber.class)
and@CucumberOptions(...)
Context & Motivation
Rerunning failing tests as an integral part of the build, especially in large tests sets that are ran overnight, allows us to prioritize investigating the genuine failures over the flaky ones.
The text was updated successfully, but these errors were encountered: