Class TestSupport
java.lang.Object
io.quarkus.deployment.dev.testing.TestSupport
- All Implemented Interfaces:
TestController
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescription(package private) String
(package private) String
(package private) String
(package private) String
(package private) String
(package private) String
(package private) String
(package private) boolean
(package private) final List<CompilationProvider>
(package private) QuarkusCompiler
(package private) final DevModeContext
(package private) final CuratedApplication
(package private) final DevModeType
(package private) boolean
(package private) Pattern
(package private) Boolean
(package private) Pattern
(package private) final List<ModuleTestRunner>
(package private) boolean
(package private) final List<TestListener>
(package private) TestRunResults
(package private) TestType
-
Constructor Summary
ConstructorDescriptionTestSupport
(CuratedApplication curatedApplication, List<CompilationProvider> compilationProviders, DevModeContext context, DevModeType devModeType) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(TestListener listener) void
close()
The current test statelong
returns the current status of the test runner.void
init()
static Optional<TestSupport>
instance()
boolean
boolean
boolean
boolean
boolean
boolean
void
Print the current results and failuresvoid
Runs all testsvoid
re-runs all tests that are currently in a failed state(package private) void
runInternal
(ClassScanResult classScanResult, boolean reRunFailures) void
runTests()
void
runTests
(ClassScanResult classScanResult) void
setConfig
(TestConfig config) setConfiguredDisplayTestOutput
(boolean displayTestOutput) void
setDisplayTestOutput
(boolean displayTestOutput) Sets if test output should be displayed in the logsvoid
setEngines
(List<String> includeEngines, List<String> excludeEngines) void
setPatterns
(String include, String exclude) void
setTestType
(TestType testType) void
start()
void
stop()
void
void
boolean
Toggles 'broken only' mode, where only failing tests are runboolean
Toggles instrumentation based reload.boolean
Toggles instrumentation based reload.boolean
Toggles test output
-
Field Details
-
curatedApplication
-
compilationProviders
-
context
-
moduleRunners
-
testListeners
-
devModeType
-
compiler
-
started
volatile boolean started -
testRunResults
-
includeTags
-
excludeTags
-
include
-
exclude
-
includeEngines
-
excludeEngines
-
displayTestOutput
volatile boolean displayTestOutput -
explicitDisplayTestOutput
-
brokenOnlyMode
volatile boolean brokenOnlyMode -
testType
-
appPropertiesIncludeTags
String appPropertiesIncludeTags -
appPropertiesExcludeTags
String appPropertiesExcludeTags -
appPropertiesIncludePattern
String appPropertiesIncludePattern -
appPropertiesExcludePattern
String appPropertiesExcludePattern -
appPropertiesIncludeEngines
String appPropertiesIncludeEngines -
appPropertiesExcludeEngines
String appPropertiesExcludeEngines -
appPropertiesTestType
String appPropertiesTestType
-
-
Constructor Details
-
TestSupport
public TestSupport(CuratedApplication curatedApplication, List<CompilationProvider> compilationProviders, DevModeContext context, DevModeType devModeType)
-
-
Method Details
-
instance
-
isRunning
public boolean isRunning() -
getTestListeners
-
getStatus
returns the current status of the test runner.This is expressed in terms of test run ids, where -1 signifies no result.
-
start
public void start() -
init
public void init() -
close
public void close() -
stop
public void stop() -
runTests
public void runTests() -
runFailedTests
public void runFailedTests()Description copied from interface:TestController
re-runs all tests that are currently in a failed state- Specified by:
runFailedTests
in interfaceTestController
-
runTests
-
runInternal
-
addListener
-
isStarted
public boolean isStarted() -
getCompiler
-
getTestRunResults
-
getResults
-
getRunningTestRunId
public long getRunningTestRunId() -
setTags
-
setPatterns
-
setEngines
-
setConfiguredDisplayTestOutput
-
setTestType
-
currentState
Description copied from interface:TestController
The current test state- Specified by:
currentState
in interfaceTestController
-
runAllTests
public void runAllTests()Description copied from interface:TestController
Runs all tests- Specified by:
runAllTests
in interfaceTestController
-
setDisplayTestOutput
public void setDisplayTestOutput(boolean displayTestOutput) Description copied from interface:TestController
Sets if test output should be displayed in the logs- Specified by:
setDisplayTestOutput
in interfaceTestController
-
toggleBrokenOnlyMode
public boolean toggleBrokenOnlyMode()Description copied from interface:TestController
Toggles 'broken only' mode, where only failing tests are run- Specified by:
toggleBrokenOnlyMode
in interfaceTestController
- Returns:
true
if this change enabled broken only mode
-
toggleTestOutput
public boolean toggleTestOutput()Description copied from interface:TestController
Toggles test output- Specified by:
toggleTestOutput
in interfaceTestController
- Returns:
true
if this change to test output mode
-
toggleInstrumentation
public boolean toggleInstrumentation()Description copied from interface:TestController
Toggles instrumentation based reload.- Specified by:
toggleInstrumentation
in interfaceTestController
- Returns:
true
if this change to do instrumentation based reload
-
toggleLiveReloadEnabled
public boolean toggleLiveReloadEnabled()Description copied from interface:TestController
Toggles instrumentation based reload.- Specified by:
toggleLiveReloadEnabled
in interfaceTestController
- Returns:
true
if this change to do instrumentation based reload
-
printFullResults
public void printFullResults()Description copied from interface:TestController
Print the current results and failures- Specified by:
printFullResults
in interfaceTestController
-
isBrokenOnlyMode
public boolean isBrokenOnlyMode()- Specified by:
isBrokenOnlyMode
in interfaceTestController
- Returns:
true
if broken only mode is enabled
-
isDisplayTestOutput
public boolean isDisplayTestOutput()- Specified by:
isDisplayTestOutput
in interfaceTestController
- Returns:
true
if test output is enabled
-
isInstrumentationEnabled
public boolean isInstrumentationEnabled()- Specified by:
isInstrumentationEnabled
in interfaceTestController
- Returns:
true
if live reload is enabled
-
isLiveReloadEnabled
public boolean isLiveReloadEnabled()- Specified by:
isLiveReloadEnabled
in interfaceTestController
- Returns:
true
if live reload is enabled
-
testCompileFailed
-
testCompileSucceeded
public void testCompileSucceeded() -
setConfig
-
getConfig
-