You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In addition to the existing @BeforeAll, @BeforeEach, @AfterEach, and @AfterAll lifecycle methods, we should add introduce @BeforeArgumentSet/@AfterArgumentSet annotations that can be declared on static (unless TestInstance.Lifecycle.PER_CLASS is used) methods of the test class that will be executed once per argument set before/after all test methods and nested classes in a @ParameterizedContainer class.
Since those methods are usually static, they won't have access to the resolved parameters. Therefore, and for compatibility with JUnit 4's @BeforeParams/@AfterParams methods, we should support injecting them as method parameters of those lifecycle methods.
Deliverables
Introduce @BeforeArgumentSet/@AfterArgumentSet lifecycle methods for @ParameterizedContainer classes
Add support for passing the resolved arguments of the current invocation to those lifecycle methods
The text was updated successfully, but these errors were encountered:
Follow-up on #4320.
In addition to the existing
@BeforeAll
,@BeforeEach
,@AfterEach
, and@AfterAll
lifecycle methods, we should add introduce@BeforeArgumentSet
/@AfterArgumentSet
annotations that can be declared onstatic
(unlessTestInstance.Lifecycle.PER_CLASS
is used) methods of the test class that will be executed once per argument set before/after all test methods and nested classes in a@ParameterizedContainer
class.Since those methods are usually
static
, they won't have access to the resolved parameters. Therefore, and for compatibility with JUnit 4's@BeforeParams
/@AfterParams
methods, we should support injecting them as method parameters of those lifecycle methods.Deliverables
@BeforeArgumentSet
/@AfterArgumentSet
lifecycle methods for@ParameterizedContainer
classesThe text was updated successfully, but these errors were encountered: