Class TestSupport
- java.lang.Object
-
- io.quarkus.deployment.dev.testing.TestSupport
-
- All Implemented Interfaces:
TestController
public class TestSupport extends Object implements TestController
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTestSupport.RunStatus
-
Field Summary
Fields Modifier and Type Field Description (package private) booleanbrokenOnlyMode(package private) List<CompilationProvider>compilationProviders(package private) QuarkusCompilercompiler(package private) DevModeContextcontext(package private) CuratedApplicationcuratedApplication(package private) booleandisplayTestOutput(package private) Patternexclude(package private) List<String>excludeTags(package private) BooleanexplicitDisplayTestOutput(package private) Patterninclude(package private) List<String>includeTags(package private) booleanstarted(package private) CuratedApplicationtestCuratedApplication(package private) List<TestListener>testListeners(package private) TestRunnertestRunner(package private) TestRunResultstestRunResults(package private) TestStatetestState(package private) TestTypetestType
-
Constructor Summary
Constructors Constructor Description TestSupport(CuratedApplication curatedApplication, List<CompilationProvider> compilationProviders, DevModeContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(TestListener listener)TestStatecurrentState()The current test stateQuarkusCompilergetCompiler()CuratedApplicationgetCuratedApplication()TestRunResultsgetResults()TestSupport.RunStatusgetStatus()returns the current status of the test runner.List<TestListener>getTestListeners()TestRunnergetTestRunner()TestRunResultsgetTestRunResults()voidinit()static Optional<TestSupport>instance()booleanisBrokenOnlyMode()booleanisDisplayTestOutput()booleanisInstrumentationEnabled()booleanisLiveReloadEnabled()booleanisRunning()booleanisStarted()voidpause()voidprintFullResults()Print the current results and failuresvoidresume()voidrunAllTests()Runs all testsvoidrunFailedTests()re-runs all tests that are currently in a failed stateTestSupportsetConfiguredDisplayTestOutput(boolean displayTestOutput)voidsetDisplayTestOutput(boolean displayTestOutput)Sets if test output should be displayed in the logsvoidsetPatterns(String include, String exclude)voidsetTags(List<String> includeTags, List<String> excludeTags)TestSupportsetTestType(TestType testType)voidstart()voidstop()booleantoggleBrokenOnlyMode()Toggles 'broken only' mode, where only failing tests are runbooleantoggleInstrumentation()Toggles instrumentation based reload.booleantoggleTestOutput()Toggles test output
-
-
-
Field Detail
-
curatedApplication
final CuratedApplication curatedApplication
-
compilationProviders
final List<CompilationProvider> compilationProviders
-
context
final DevModeContext context
-
testListeners
final List<TestListener> testListeners
-
testState
final TestState testState
-
testCuratedApplication
volatile CuratedApplication testCuratedApplication
-
compiler
volatile QuarkusCompiler compiler
-
testRunner
volatile TestRunner testRunner
-
started
volatile boolean started
-
testRunResults
volatile TestRunResults testRunResults
-
include
volatile Pattern include
-
exclude
volatile Pattern exclude
-
displayTestOutput
volatile boolean displayTestOutput
-
explicitDisplayTestOutput
volatile Boolean explicitDisplayTestOutput
-
brokenOnlyMode
volatile boolean brokenOnlyMode
-
testType
volatile TestType testType
-
-
Constructor Detail
-
TestSupport
public TestSupport(CuratedApplication curatedApplication, List<CompilationProvider> compilationProviders, DevModeContext context)
-
-
Method Detail
-
instance
public static Optional<TestSupport> instance()
-
isRunning
public boolean isRunning()
-
getTestListeners
public List<TestListener> getTestListeners()
-
getStatus
public TestSupport.RunStatus 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()
-
stop
public void stop()
-
addListener
public void addListener(TestListener listener)
-
isStarted
public boolean isStarted()
-
getTestRunner
public TestRunner getTestRunner()
-
getCuratedApplication
public CuratedApplication getCuratedApplication()
-
getCompiler
public QuarkusCompiler getCompiler()
-
getTestRunResults
public TestRunResults getTestRunResults()
-
pause
public void pause()
-
resume
public void resume()
-
getResults
public TestRunResults getResults()
-
setConfiguredDisplayTestOutput
public TestSupport setConfiguredDisplayTestOutput(boolean displayTestOutput)
-
setTestType
public TestSupport setTestType(TestType testType)
-
currentState
public TestState currentState()
Description copied from interface:TestControllerThe current test state- Specified by:
currentStatein interfaceTestController
-
runAllTests
public void runAllTests()
Description copied from interface:TestControllerRuns all tests- Specified by:
runAllTestsin interfaceTestController
-
setDisplayTestOutput
public void setDisplayTestOutput(boolean displayTestOutput)
Description copied from interface:TestControllerSets if test output should be displayed in the logs- Specified by:
setDisplayTestOutputin interfaceTestController
-
runFailedTests
public void runFailedTests()
Description copied from interface:TestControllerre-runs all tests that are currently in a failed state- Specified by:
runFailedTestsin interfaceTestController
-
toggleBrokenOnlyMode
public boolean toggleBrokenOnlyMode()
Description copied from interface:TestControllerToggles 'broken only' mode, where only failing tests are run- Specified by:
toggleBrokenOnlyModein interfaceTestController- Returns:
trueif this change enabled broken only mode
-
toggleTestOutput
public boolean toggleTestOutput()
Description copied from interface:TestControllerToggles test output- Specified by:
toggleTestOutputin interfaceTestController- Returns:
trueif this change to test output mode
-
toggleInstrumentation
public boolean toggleInstrumentation()
Description copied from interface:TestControllerToggles instrumentation based reload.- Specified by:
toggleInstrumentationin interfaceTestController- Returns:
trueif this change to do instrumentation based reload
-
printFullResults
public void printFullResults()
Description copied from interface:TestControllerPrint the current results and failures- Specified by:
printFullResultsin interfaceTestController
-
isBrokenOnlyMode
public boolean isBrokenOnlyMode()
- Specified by:
isBrokenOnlyModein interfaceTestController- Returns:
trueif broken only mode is enabled
-
isDisplayTestOutput
public boolean isDisplayTestOutput()
- Specified by:
isDisplayTestOutputin interfaceTestController- Returns:
trueif test output is enabled
-
isInstrumentationEnabled
public boolean isInstrumentationEnabled()
- Specified by:
isInstrumentationEnabledin interfaceTestController- Returns:
trueif live reload is enabled
-
isLiveReloadEnabled
public boolean isLiveReloadEnabled()
- Specified by:
isLiveReloadEnabledin interfaceTestController- Returns:
trueif live reload is enabled
-
-