Package io.quarkus.test.common
Annotation Type QuarkusTestResource
-
@Target(TYPE) @Retention(RUNTIME) @Documented @Repeatable(List.class) public @interface QuarkusTestResource
Used to define a test resource. AllQuarkusTestResourceannotations in the test module are discovered (regardless of the test which contains the annotation) and their correspondingQuarkusTestResourceLifecycleManagerstarted before any test is run.
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description Class<? extends QuarkusTestResourceLifecycleManager>value
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description ResourceArg[]initArgsbooleanparallelWhether this test resource is to be started in parallel (concurrently) along with others also marked as parallelbooleanrestrictToAnnotatedClassWhether this annotation should only be enabled if it is placed on the currently running test class or test profile.
-
-
-
Element Detail
-
value
Class<? extends QuarkusTestResourceLifecycleManager> value
- Returns:
- The class managing the lifecycle of the test resource.
-
-
-
initArgs
ResourceArg[] initArgs
- Returns:
- The arguments to be passed to the
QuarkusTestResourceLifecycleManager - See Also:
QuarkusTestResourceLifecycleManager.init(Map)
- Default:
- {}
-
-
-
restrictToAnnotatedClass
boolean restrictToAnnotatedClass
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
-
-