I'm using DynamicNode
very successfully in a framework that dynamically generates tests and executes them.
Now I have a need to execute some code after all DynamicNode
collections have executed. This can mean that I have a single JUnit5 class with multiple methods that return Iterable<DynamicNode>
, but I want to run something only after all the test methods have completed.
Is there a way to do this automatically ?
EDIT: ideally I would like my framework to inject the code to be executed automatically, without the user needing to add a @AfterAll
annotation on a method and write some extra code.