Provide mechanism to reuse JUnit Jupiter extensions in other test engines
While writing an own TestEngine we found it quite handy to reuse JUnit Jupiter's extension mechanism along with ExecutionCondition to conditionally run/skip classes and methods (see mp911de/microbenchmark-runner#19 for further details).
However, some implementations (such as DisabledCondition) are not visible or internal API (e.g. ExtensionRegistry). As an implementer, there are two ways to implement extension support:
- Using internal API
- Reimplementing
Neither is great, so it would be better to be able to reuse the existing bits of JUnit Jupiter's engine implementation.
Deliverables
- [ ] Stable implementation of
ExtensionRegistry - [ ] Stable implementation of support classes (such as
AbstractExtensionContextandExtensionUtils)
Currently slated for 5.4 M2 solely for the purpose of team discussion and triaging.
FWIW @leonard84 and I came across the same issue when experimenting with what it would entail to add support for Jupiter extensions to Spock 2.0.
Discussion in progress...
I'm not sure how useful such a feature can be.
As far as I remember most Jupiter extensions are tightly coupled to Jupiter's lifecycle. Some lifecycle stuff will be more or less present in all/most other test engines but other stuff won't. That means that some extensions will work, others won't work and some will partially work. As a user you can never rely on anything.
What could probably be made to work is a restricted set of extensions/hooks/whatever that only concern those lifecycle aspects which are shared by all test engines. I guess that's everything going through EngineExecutionListener. Obviously that's only a small subset of all extension points available in Jupiter.
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. Thank you for your contribution.
This would help with https://github.com/spockframework/spock/issues/1273
This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. Thank you for your contribution.
It would still be helpful to have access to the Store classes via the platform.