Annotation Type ParameterizedTest
-
@Target({ANNOTATION_TYPE,METHOD}) @Retention(RUNTIME) @Documented @API(status=EXPERIMENTAL, since="5.0") @TestTemplate @ExtendWith(org.junit.jupiter.params.ParameterizedTestExtension.class) public @interface ParameterizedTest@ParameterizedTestis used to signal that the annotated method is a parameterized test method.@ParameterizedTestmethods must specify at least oneArgumentsProvidervia the@ArgumentsSourceor a corresponding composed annotation. The provider is responsible for providing aStreamofArgumentsthat will be used to invoke the@ParameterizedTestmethod. The method may have additional parameters to be resolved by otherParameterResolversat the end of the method's parameter list.Method parameters may use
@ConvertWithor a corresponding composed annotation to specify an explicitArgumentConverter.@ParameterizedTestmay also be used as a meta-annotation in order to create a custom composed annotation that inherits the semantics of@ParameterizedTest.@ParameterizedTestmethods must not beprivateorstatic.- Since:
- 5.0
- See Also:
ArgumentsSource,CsvFileSource,CsvSource,EnumSource,MethodSource,ValueSource,ConvertWith
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.StringnameThe name pattern to be used for invocations of the parameterized test; never blank or consisting solely of whitespace.
-
-
-
Element Detail
-
name
java.lang.String name
The name pattern to be used for invocations of the parameterized test; never blank or consisting solely of whitespace.You may use the following placeholders:
{index}: the current invocation index (1-based){arguments}: the complete, comma-separated arguments list{0},{1}, etc.: an individual argument
For the latter, you may use
MessageFormatpatterns to customize formatting of values.- See Also:
MessageFormat
- Default:
- "[{index}] {arguments}"
-
-