-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Introduce error handling mechanism for validation and discovery errors #242
Comments
The same is true for invalid custom display names supplied by the user, as described in #743. I will therefore update the description of this issue to reflect the broader scope. |
FYI: I have introduced a minimum set of Deliverables. |
I am thinking this reminds me the approach we took for vintage to handle multiple assertion errors using a MultipleFailuresError. We could be possible that we could store all validation errors in a Throwable - using a MultipleFailuresError when there is more than one, that would be carried over to the execution phase and when this is nonEmpty we would throw the exception instead of executing the test. It might also be worth considering for this mechanism to track all exceptions that occur while processing a single discovered test and throw it in the execution phase. This way instead of the whole process stopping, we could still process the rest of the tests that encountered no problems and only fail on single tests. PS While I was writing, this @sbrannen changed the title and description and now it sound more like what I am writing here! 😃 |
@gaganis, thanks for sharing your ideas. A few notes... No need to use We're on Java 8 and can use suppressed exceptions. Plus, we already have a |
The scope of this issue has been broadened in order to encompass the Platform as well. |
Rather than using exceptions of any kind, having some kind of notification collector as a return or in/out parameter seems more flexible since any exception will stop an engine's discovery phase whereas many notifications are just warnings or pieces of information . |
Good point! I'll change the title of this issue accordingly. |
FYI: title and description have updated. |
Instead of aborting test discovery on the first problematic selector resolution result, they are now converted to discovery issues with `ERROR` severity and reported during execution. Issue: #242
Instead of aborting test discovery on the first problematic selector resolution result, they are now converted to discovery issues with `ERROR` severity and reported during execution. Issue: #242
Instead of aborting test discovery on the first problematic selector resolution result, they are now converted to discovery issues with `ERROR` severity and reported during execution. Issue: #242
Instead of aborting test discovery on the first problematic selector resolution result, they are now converted to discovery issues with `ERROR` severity and reported during execution. Issue: #242
The goal is to ease testing for discovery issues encountered by an engine (see #242).
The goal is to ease testing for discovery issues encountered by an engine (see #242).
The goal is to ease testing for discovery issues encountered by an engine (see #242).
Overview
Validation errors (e.g., for invalid
@BeforeEach
method declarations) should not abort the entire discovery phase. Instead the discovery phase should continue, with the error tracked and reported during the execution phase.Areas of Applicability
@BeforeAll
,@AfterAll
,@BeforeEach
, and@AfterEach
method declarations@Test
and@TestTemplate
on the same method)@Test
,@TestFactory
,@RepeatedTest
, and@ParameterizedTest
method declarations (see IsTestableMethod silently ignores @Test annotated methods that return a value #2244)@Nested
test class declarations (see Improve diagnostics when Vintage test engine is missing #1223, Abstract classes with@Nested
are not ignored / not handled properly #2717, and Feature suggestion: Detect missing @Nested annotations #1736)@Suite
class declarationsProposals
TestDescriptor
such as anAlwaysFailingTestDescriptor
,DeadOnArrivalTestDescriptor
, orErrorReportingTestDescriptor
.TestDescriptor
could then be thrown as an exception during the execution phase instead of executing the corresponding container or test.TestDescriptor
that signals an error that was encountered during the discovery phase.Launcher
into eachTestEngine
to report errors.Related Issues
@Nested
are not ignored / not handled properly #2717inner class
es that are children of anabstract class
are not executed despite@Nested
#4125Deliverables
EngineTestKit
support for test discovery #4393TODO [#242]
within the code base.ClassTestDescriptor
.The text was updated successfully, but these errors were encountered: