-
My Questions:
My Context:I am asking in the context of integration tests, where the execution order of test classes matters, and continuing after a failure would invalidate the remaining tests (e.g., shared state, database setup, etc.). Suppose I have a testsuite (JUnit v5.13.3 and JUnit Platform v1.13.3): import org.junit.platform.suite.api.SelectClasses;
import org.junit.platform.suite.api.Suite;
@Suite
@SelectClasses(
{
TestOne.class,
TestTwo.class,
TestThree.class
}
)
public class MyTestSuite {
} Is it possible to skip the execution of I am using Maven Surefire Plugin (v 3.2.5) and tried the configuration: <skipAfterFailureCount>1</skipAfterFailureCount> However, this does not appear to affect test execution when using JUnit 5 suites. From what I understand, skipAfterFailureCount only works with legacy JUnit 4 - is that correct? I have read about similar requests but those were referencing fail fast inside a single class, for example:
However, these mostly discuss fail-fast within a single class, not across multiple classes in a suite. Or I am not able to comprehend the usage. I'm unsure whether I’m misunderstanding the scope of those issues or if the feature I’m looking for — halting execution across multiple test classes in a suite — is currently unsupported or out of scope. Any help would be greatly appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
This feature was just integrated via: And will be available for testing in the upcoming 6.0.0-M2 pre-release. |
Beta Was this translation helpful? Give feedback.
-
Note that adding graceful cancellation support is not integrated into Maven Surefire, yet: |
Beta Was this translation helpful? Give feedback.
This feature was just integrated via:
And will be available for testing in the upcoming 6.0.0-M2 pre-release.