Package io.quarkus.test.common
Annotation Interface QuarkusTestResource
@Target(TYPE)
@Retention(RUNTIME)
@Documented
@Repeatable(List.class)
@Deprecated(forRemoval=true)
public @interface QuarkusTestResource
Deprecated, for removal: This API element is subject to removal in a future version.
Used to define a test resource.
All
QuarkusTestResource annotations in the test module
are discovered (regardless of the test which contains the annotation)
and their corresponding QuarkusTestResourceLifecycleManager
started before any test is run.
Note that test resources are never restarted when running @Nested test classes.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceDeprecated, for removal: This API element is subject to removal in a future version. -
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionClass<? extends QuarkusTestResourceLifecycleManager>Deprecated, for removal: This API element is subject to removal in a future version. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionDeprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.Whether this test resource is to be started in parallel (concurrently) along with others also marked as parallelbooleanDeprecated, for removal: This API element is subject to removal in a future version.Whether this annotation should only be enabled if it is placed on the currently running test class or test profile.
-
Element Details
-
value
Class<? extends QuarkusTestResourceLifecycleManager> valueDeprecated, for removal: This API element is subject to removal in a future version.- Returns:
- The class managing the lifecycle of the test resource.
-
-
-
initArgs
ResourceArg[] initArgsDeprecated, for removal: This API element is subject to removal in a future version.- Returns:
- The arguments to be passed to the
QuarkusTestResourceLifecycleManager - See Also:
- Default:
- {}
-
parallel
boolean parallelDeprecated, for removal: This API element is subject to removal in a future version.Whether this test resource is to be started in parallel (concurrently) along with others also marked as parallel- Default:
- false
-
restrictToAnnotatedClass
boolean restrictToAnnotatedClassDeprecated, for removal: This API element is subject to removal in a future version.Whether this annotation should only be enabled if it is placed on the currently running test class or test profile. Note that this defaults to true for meta-annotations since meta-annotations are only considered for the current test class or test profile.- Default:
- false
-
WithTestResourceinstead. It will be a long while before this is removed, but better to move to the replacement sooner than later.