Class TestConfig
- java.lang.Object
-
- io.quarkus.deployment.dev.testing.TestConfig
-
@ConfigRoot public class TestConfig extends Object
This is used currently only to suppress warnings about unknown properties when the user supplies something like: -Dquarkus.test.profile=someProfile or -Dquarkus.test.native-image-profile=someProfileTODO refactor code to actually use these values
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTestConfig.Modestatic classTestConfig.Profile
-
Field Summary
Fields Modifier and Type Field Description booleanbasicConsoleDisable the testing status/prompt message at the bottom of the console and log these messages to STDOUT instead.(package private) StringclassClonePatternIf a class matches this pattern then it will be cloned into the Quarkus ClassLoader even if it is in a parent first artifact.booleanconsoleIf test results and status should be displayed in the console.TestConfig.ModecontinuousTestingIf continuous testing is enabled.booleandisableColorDisable color in the testing status and prompt messages.booleandisableConsoleInputDisables the ability to enter input on the console.booleandisplayTestOutputIf output from the running tests should be displayed in the console.Optional<String>excludePatternTests that should be excluded with continuous testing.Optional<List<String>>excludeTagsTags that should be excluded by default with continuous testing.booleanflatClassPathChanges tests to use the 'flat' ClassPath used in Quarkus 1.x versions.(package private) DurationhangDetectionTimeoutConfigures the hang detection in @QuarkusTest.Optional<String>includePatternTests that should be included for continuous testing.Optional<List<String>>includeTagsTags that should be included for continuous testing.(package private) Optional<String>integrationJvmArgLineJVM parameters that are used to launch jar based integration tests.(package private) StringnativeImageProfileThe profile to use when testing the native image(package private) DurationnativeImageWaitTimeDuration to wait for the native image to built during testing(package private) TestConfig.ProfileprofileProfile related test settings(package private) TestTypetypeThe type of test to run, this can be either: quarkus-test: Only runs@QuarkusTestannotated test classes unit: Only runs classes that are not annotated with@QuarkusTestall: Runs both, running the unit tests first
-
Constructor Summary
Constructors Constructor Description TestConfig()
-
-
-
Field Detail
-
continuousTesting
@ConfigItem(defaultValue="paused") public 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
@ConfigItem(defaultValue="false") public boolean displayTestOutput
If output from the running tests should be displayed in the console.
-
includeTags
@ConfigItem public Optional<List<String>> includeTags
Tags that should be included for continuous testing.
-
excludeTags
@ConfigItem(defaultValue="slow") public 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'
-
includePattern
@ConfigItem public 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
@ConfigItem(defaultValue=".*\\.IT[^.]+|.*IT|.*ITCase") public 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.
-
basicConsole
@ConfigItem(defaultValue="false") public boolean basicConsole
Disable the testing status/prompt message at the bottom of the console and log these messages to STDOUT instead. Use this option if your terminal does not support ANSI escape sequences.
-
disableColor
@ConfigItem(defaultValue="false") public boolean disableColor
Disable color in the testing status and prompt messages. Use this option if your terminal does not support color.
-
console
@ConfigItem(defaultValue="true") public boolean console
If test results and status should be displayed in the console. If this is false results can still be viewed in the dev console.
-
disableConsoleInput
@ConfigItem(defaultValue="false") public boolean disableConsoleInput
Disables the ability to enter input on the console.
-
flatClassPath
@ConfigItem(defaultValue="false") public 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.
-
nativeImageWaitTime
@ConfigItem(defaultValue="PT5M") Duration nativeImageWaitTime
Duration to wait for the native image to built during testing
-
nativeImageProfile
@ConfigItem(defaultValue="prod") String nativeImageProfile
The profile to use when testing the native image
-
profile
@ConfigItem TestConfig.Profile profile
Profile related test settings
-
integrationJvmArgLine
@ConfigItem Optional<String> integrationJvmArgLine
JVM parameters that are used to launch jar based integration tests.
-
hangDetectionTimeout
@ConfigItem(defaultValue="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
@ConfigItem(defaultValue="all") TestType type
The type of test to run, this can be either: quarkus-test: Only runs@QuarkusTestannotated test classes unit: Only runs classes that are not annotated with@QuarkusTestall: Runs both, running the unit tests first
-
classClonePattern
@ConfigItem(defaultValue="java\\..*") String classClonePattern
If a class matches this pattern then it will be cloned into the Quarkus ClassLoader even if it is in a parent first artifact. This is important for collections which can contain objects from the Quarkus ClassLoader, but for most parent first classes it will just cause problems.
-
-