Closed
Description
Current BeforeEachCallback
and BeforeTestExecutionCallback
are invoked after ArgumentProvider finished. Would be either add more methods to the existing callbacks or to create a new callback that would run before the ArgumentProvider starts.
Rationale: in my extension I'd like to impact how the data is generated in the ArgumentProviders (I'm interested in @MethodSource
in particular). So that it's possible to set the seed for randomization that happens in the @MethodSource
.
Activity
sbrannen commentedon Jun 13, 2017
See also: https://github.com/qala-io/datagen/blob/master/junit5/README.md
nipafx commentedon Jun 13, 2017
@ctapobep Would #853 cover your use case.
ctapobep commentedon Jun 14, 2017
I don't think so - I need a hook before argument providers are run.
nipafx commentedon Jun 15, 2017
Why not create your own
@RandomMethodSource
argument provider, then?Regarding your proposal to modify existing callbacks: Note that argument providers are slightly separate from the rest of Jupiter because, strictly speaking, they are part of an extension (
junit-jupiter-params
). In my opinion this closes off the possibility to modify existing extension points to interact with them. On top of that, such a modification would also undermine the effort to keep extension points simple and focused.This leaves your proposal to add a callback to providers that they call before resolution...
stale commentedon May 13, 2021
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.
stale commentedon Jun 3, 2021
This issue has been automatically closed due to inactivity. If you have a good use case for this feature, please feel free to reopen the issue.