-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Milestone
Description
Overview
Currently the source for dynamic tests is a always a MethodSource
pointing to the @TestFactory
annotated method. In case the dynamic tests are based on external files, like in a cucumber implementation, it should be possible to specify the source.
Example
Given a file "helloword.feature" containing
"""
Feature: Hello World Feature
@hello @world
Scenario: Hello World Scenario
Given the user name is 'World'
When the user clicks the hello button
Then the output is 'Hello World'
"""
When dynamic tests are created for this feature
Then the test description should have a file source of "helloworld.feature" line 4
And the test description should have the tags ["hello", "world"]
Related Issues
- Consider determining line number information for dynamic tests and adding it to ClassTestSource #434
- Enhance DynamicNode with optional TestSource property #1293
- Support classpath resource for custom test source in dynamic tests #1467
Deliverables
-
DynamicTest
/DynamicContainer
should have additional factory methods allowing to specifyTestSource
- ❌
DynamicTest
/DynamicContainer
should have additional factory methods allowing to specifySet<TestTag>
- The above information should be used when creating the
DynamicTestTestDescriptor
andDynamicContainerTestDescriptor
(The actual creation of the dynamic tests for a cucumber scenario is out of scope)