Package io.quarkus.test.junit
Interface QuarkusTestProfile
-
public interface QuarkusTestProfileDefines a 'test profile'. Tests run under a test profile will have different configuration options to other tests.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classQuarkusTestProfile.TestResourceEntry
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default String[]commandLineParameters()The command line parameters that are passed to the main method on startup.default booleandisableApplicationLifecycleObservers()If this method returns true then allStartupEventandShutdownEventobservers declared on application beans should be disabled.default booleandisableGlobalTestResources()If this is returns true then only the test resources returned fromtestResources()will be started, global annotated test resources will be ignored.default Map<String,String>getConfigOverrides()Returns additional config to be applied to the test.default StringgetConfigProfile()Allows the default config profile to be overridden.default Set<Class<?>>getEnabledAlternatives()Returns enabled alternatives.default booleanrunMainMethod()If the main method should be run.default Set<String>tags()The tags this profile is associated with.default List<QuarkusTestProfile.TestResourceEntry>testResources()AdditionalQuarkusTestResourceLifecycleManagerclasses (along with their init params) to be used from this specific test profile.
-
-
-
Method Detail
-
getConfigOverrides
default Map<String,String> getConfigOverrides()
Returns additional config to be applied to the test. This will override any existing config (including in application.properties), however existing config will be merged with this (i.e. application.properties config will still take effect, unless a specific config key has been overridden).
-
getEnabledAlternatives
default Set<Class<?>> getEnabledAlternatives()
Returns enabled alternatives. This has the same effect as setting the 'quarkus.arc.selected-alternatives' config key, however it may be more convenient.
-
getConfigProfile
default String getConfigProfile()
Allows the default config profile to be overridden. This basically just sets the quarkus.test.profile system property before the test is run.
-
testResources
default List<QuarkusTestProfile.TestResourceEntry> testResources()
AdditionalQuarkusTestResourceLifecycleManagerclasses (along with their init params) to be used from this specific test profile. If this method is not overridden, then only theQuarkusTestResourceLifecycleManagerclasses enabled via theQuarkusTestResourceclass annotation will be used for the tests using this profile (which is the same behavior as tests that don't use a profile at all).
-
disableGlobalTestResources
default boolean disableGlobalTestResources()
If this is returns true then only the test resources returned fromtestResources()will be started, global annotated test resources will be ignored.
-
tags
default Set<String> tags()
The tags this profile is associated with. When thequarkus.test.profile.tagsSystem property is set (its value is a comma separated list of strings) then Quarkus will only execute tests that are annotated with a@TestProfilethat has at least one of the supplied (via the aforementioned system property) tags.
-
commandLineParameters
default String[] commandLineParameters()
The command line parameters that are passed to the main method on startup. This is ignored forQuarkusMainTest, which has its own way of passing parameters.
-
runMainMethod
default boolean runMainMethod()
If the main method should be run. This is ignored forQuarkusMainTest, where the main method is always run.
-
disableApplicationLifecycleObservers
default boolean disableApplicationLifecycleObservers()
If this method returns true then allStartupEventandShutdownEventobservers declared on application beans should be disabled.
-
-