Extension Context
Explore the ExtensionContext interface in JUnit 5 to understand how extensions access test context. Learn about hierarchical context, the Store interface for state management, and Namespace for data scoping within tests.
We'll cover the following...
We'll cover the following...
The ExtensionContext interface
When building extensions, the most important concept to understand is the ExtensionContext interface. It contains context information about the currently running test class or method. Instances of ExtensionContext pass to extensions as parameters that allow them to access necessary context information. They’re organized in a hierarchical way. An ...