Interface TestConfig


@ConfigMapping(prefix="quarkus.test") @ConfigRoot(phase=BUILD_TIME) public interface TestConfig
Testing configuration.
  • Method Details

    • continuousTesting

      @WithDefault("paused") TestConfig.Mode continuousTesting()
      If continuous testing is enabled.

      The default value is 'paused', which will allow you to start testing from the console or the Dev UI, but will not run tests on startup.

      If this is set to 'enabled' then testing will start as soon as the application has started.

      If this is 'disabled' then continuous testing is not enabled, and can't be enabled without restarting the application.

    • displayTestOutput

      @WithDefault("false") boolean displayTestOutput()
      If output from the running tests should be displayed in the console.
    • classOrderer

      @WithDefault("io.quarkus.test.junit.util.QuarkusTestProfileAwareClassOrderer") Optional<String> classOrderer()
      The FQCN of the JUnit ClassOrderer to use. If the class cannot be found, it fallbacks to JUnit default behaviour which does not set a ClassOrderer at all.
      See Also:
    • includeTags

      Optional<List<String>> includeTags()
      Tags that should be included for continuous testing. This supports JUnit Tag Expressions.
      See Also:
    • excludeTags

      @WithDefault("slow") Optional<List<String>> excludeTags()
      Tags that should be excluded by default with continuous testing.

      This is ignored if include-tags has been set.

      Defaults to 'slow'.

      This supports JUnit Tag Expressions.

      See Also:
    • includePattern

      Optional<String> includePattern()
      Tests that should be included for continuous testing. This is a regular expression and is matched against the test class name (not the file name).
    • excludePattern

      @WithDefault(".*\\.IT[^.]+|.*IT|.*ITCase") Optional<String> excludePattern()
      Tests that should be excluded with continuous testing. This is a regular expression and is matched against the test class name (not the file name).

      This is ignored if include-pattern has been set.

    • includeEngines

      Optional<List<String>> includeEngines()
      Test engine ids that should be included for continuous testing.
    • excludeEngines

      Optional<List<String>> excludeEngines()
      Test engine ids that should be excluded by default with continuous testing.

      This is ignored if include-engines has been set.

    • flatClassPath

      @WithDefault("false") boolean flatClassPath()
      Changes tests to use the 'flat' ClassPath used in Quarkus 1.x versions.

      This means all Quarkus and test classes are loaded in the same ClassLoader, however it means you cannot use continuous testing.

      Note that if you find this necessary for your application then you may also have problems running in development mode, which cannot use a flat class path.

    • integrationTestProfile

      @WithDefault("prod") String integrationTestProfile()
      The profile to use when testing using @QuarkusIntegrationTest
    • profile

      Profile related test settings
    • container

      Container related test settings
    • restAssured

      TestConfig.RestAssured restAssured()
      RestAssured related test settings
    • argLine

      Optional<@WithConverter(io.quarkus.runtime.configuration.TrimmedStringConverter.class) String> argLine()
      Additional launch parameters to be used when Quarkus launches the produced artifact for @QuarkusIntegrationTest When the artifact is a jar, this string is passed right after the java command. When the artifact is a container, this string is passed right after the docker run command. When the artifact is a native binary, this string is passed right after the native binary name.
    • env

      @ConfigDocMapKey("environment-variable-name") Map<String,String> env()
      Additional environment variables to be set in the process that @QuarkusIntegrationTest launches.
    • waitTime

      @WithDefault("PT1M") Duration waitTime()
      Used in @QuarkusIntegrationTest to determine how long the test will wait for the application to launch
    • hangDetectionTimeout

      @WithDefault("10m") Duration hangDetectionTimeout()
      Configures the hang detection in @QuarkusTest. If no activity happens (i.e. no test callbacks are called) over this period then QuarkusTest will dump all threads stack traces, to help diagnose a potential hang.

      Note that the initial timeout (before Quarkus has started) will only apply if provided by a system property, as it is not possible to read all config sources until Quarkus has booted.

    • type

      @WithDefault("all") TestType type()
      The type of test to run, this can be either:

      quarkus-test: Only runs @QuarkusTest annotated test classes unit: Only runs classes that are not annotated with @QuarkusTest all: Runs both, running the unit tests first

    • onlyTestApplicationModule

      @WithDefault("false") boolean onlyTestApplicationModule()
      If this is true then only the tests from the main application module will be run (i.e. the module that is currently running mvn quarkus:dev).

      If this is false then tests from all dependency modules will be run as well.

    • includeModulePattern

      Optional<String> includeModulePattern()
      Modules that should be included for continuous testing. This is a regular expression and is matched against the module groupId:artifactId.
    • excludeModulePattern

      Optional<String> excludeModulePattern()
      Modules that should be excluded for continuous testing. This is a regular expression and is matched against the module groupId:artifactId.

      This is ignored if include-module-pattern has been set.

    • enableCallbacksForIntegrationTests

      @WithDefault("false") boolean enableCallbacksForIntegrationTests()
      If the test callbacks should be invoked for the integration tests (tests annotated with @QuarkusIntegrationTest).
    • integrationTestArtifactType

      Optional<String> integrationTestArtifactType()
      Used to override the artifact type against which a @QuarkusIntegrationTest or @QuarkusMainIntegrationTest run. For example, if the application's artifact is a container build from a jar, this property could be used to test the jar instead of the container.

      Allowed values are: jar, native