Interface QuarkusTestProfile


  • public interface QuarkusTestProfile
    Defines a 'test profile'. Tests run under a test profile will have different configuration options to other tests.

    If an implementation of this interface declares CDI beans, via producer methods/fields and nested static classes, then those beans are only taken into account if this test profile is used. In other words, the beans are ignored for any other 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.
      • disableGlobalTestResources

        default boolean disableGlobalTestResources()
        If this returns true then only the test resources returned from testResources() will be started, global annotated test resources will be ignored.
      • tags

        default Set<String> tags()
        The tags this profile is associated with. When the quarkus.test.profile.tags System property is set (its value is a comma separated list of strings) then Quarkus will only execute tests that are annotated with a @TestProfile that 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 for QuarkusMainTest, which has its own way of passing parameters.
      • runMainMethod

        default boolean runMainMethod()
        If the main method should be run. This is ignored for QuarkusMainTest, where the main method is always run.
      • disableApplicationLifecycleObservers

        default boolean disableApplicationLifecycleObservers()
        If this method returns true then all StartupEvent and ShutdownEvent observers declared on application beans should be disabled.