[JUnit5] Get children of JupiterEngineExtensionContext

I am coding an extension in Junit5. In each method beforeAll(), beforeEach(), afterEach() and afterAll(), there will be a “context” parameter, which is an ExtensionContext value. Similar to this:

https://preview.redd.it/6de9dsecwxb61.png?width=369&format=png&auto=webp&s=42034646ed3b5dc4aadd82617850c39bcfdff99e

When I try to debug the data of its root, I see all test cases are listed in the children of that. However, I can’t find a way to access these values (some classes and methods are internal). Is there any solution to get the list of children here during runtime?

https://preview.redd.it/xeysmp7ewxb61.png?width=925&format=png&auto=webp&s=c15568b867fc2db0348e4d33dd587ecd4496570a

submitted by /u/themastermindnktp
[link] [comments]