Annotation Type TestTemplate

    public @interface TestTemplate
    @TestTemplate is used to signal that the annotated method is a test template method.

    In contrast to @Test methods, a test template is not itself a test case but rather a template for test cases. As such, it is designed to be invoked multiple times depending on the number of invocation contexts returned by the registered providers. Must be used together with at least one provider. Otherwise, execution will fail.

    Each invocation of a test template method behaves like the execution of a regular @Test method with full support for the same lifecycle callbacks and extensions.

    @TestTemplate methods must not be private or static and must return void.

    @TestTemplate methods may optionally declare parameters to be resolved by ParameterResolvers.

    @TestTemplate may also be used as a meta-annotation in order to create a custom composed annotation that inherits the semantics of @TestTemplate.

    See Also:
    Test, TestTemplateInvocationContext, TestTemplateInvocationContextProvider