-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Milestone
Description
Overview
IsTestMethod and IsTestTemplateMethod currently validate that @Test and @TestTemplate methods have a void return type; however, IsTestFactoryMethod only validates that @TestFactory methods do not have a void return type. Consequently, @TestFactory return types are not validated during the discovery phase.
On the other hand, @TestFactory return types are in fact validated during the execution phase, but this is late and inconsistent with the behavior for all other types of testable methods.
Related Issues
- Introduce error handling mechanism for validation and discovery errors #242
- Forbid return values from test and lifecycle methods #835
Deliverables
- Move
@TestFactorymethod return type validation fromTestFactoryTestDescriptortoIsTestFactoryMethod. - Enable
@Disabledtests inIsTestFactoryMethodTests.