Skip to content

Add TestTask::getTestDescriptor method #4711

@eric6iese

Description

@eric6iese

For our integration tests I needed a different parallelization algorithm than the one implemented on top of forkjoin which is shipped with the jupiter engine. While it was quite easy to implement this with the given APIs (besides the parallelization, it just used 99% of the jupiter-engine for everything else), I have found it a bit tricky to find out which TestNode is represented by each TestTask (could have used reflection, but used another trick).

I know this a very uncommon scenario, but would anything speak against simply adding a getTestDescriptor method to the TestTask to make usecases like this a bit easier?
I don't think there is anything wrong with this, as the TestTask always represents a TestNode which basically will always have a matching Descriptor, at least when I look at the default implementation shipped with junit. To avoid breaking changes it could be a default implementation which just throws an UnsupportedOperationException if not implemented.

Thanks in advance and keep up the good work, JUnit5 is really a great testing framework!

Deliverables

  • Add TestTask.getTestDescriptor() method

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions