public class JkProjectTesting
extends java.lang.Object
JkJavaCompilerToolChain
, JkJavaCompileSpec
for test compilation and
JkTestProcessor
, JkTestSelection
for test run.Modifier and Type | Field and Description |
---|---|
JkProjectCompilation |
compilation |
JkRunnables |
postActions |
JkTestProcessor |
processor
The processor running the tests.
|
JkTestSelection |
selection
Tests to be run.
|
JkTestProcessor |
testProcessor
Deprecated.
Use
processor instead |
JkTestSelection |
testSelection
Deprecated.
Use
selection instead |
Modifier and Type | Method and Description |
---|---|
JkProjectTesting |
apply(java.util.function.Consumer<JkProjectTesting> consumer)
Applies the given consumer to the current instance of JkProjectTesting.
|
JkTestProcessor |
createDefaultProcessor()
Creates a default test processor for running tests.
|
java.nio.file.Path |
getReportDir()
Returns the directory path where the test reports are stored.
|
JkPathSequence |
getTestClasspath()
Returns the classpath to run the test.
|
boolean |
isBreakOnFailures()
Returns if #run should fail (throwing a
IllegalArgumentException ) if test result has failures. |
boolean |
isSkipped()
Returns if the tests should be skipped.
|
void |
run()
Performs entire test phase, including :
compile regular code if needed
perform pre test tasks if present
compile test code and process test resources
execute compiled tests
execute post tesks if present
|
void |
runIfNeeded()
As #run, but performs only if not already done.
|
JkProjectTesting |
setBreakOnFailures(boolean breakOnFailures)
Sets whether the execution of tests should break (throw an IllegalArgumentException)
if there are test failures.
|
JkProjectTesting |
setReportDir(java.lang.String reportDir)
Sets the directory path where the test reports are stored.
|
JkProjectTesting |
setSkipped(boolean skipped)
Specifies if the tests should be skipped.
|
public final JkProjectCompilation compilation
@Deprecated public final JkTestProcessor testProcessor
processor
insteadpublic final JkTestProcessor processor
public final JkTestSelection selection
@Deprecated public final JkTestSelection testSelection
selection
insteadpublic final JkRunnables postActions
public JkProjectTesting apply(java.util.function.Consumer<JkProjectTesting> consumer)
public JkPathSequence getTestClasspath()
public boolean isSkipped()
public JkProjectTesting setSkipped(boolean skipped)
public boolean isBreakOnFailures()
IllegalArgumentException
) if test result has failures.public JkProjectTesting setBreakOnFailures(boolean breakOnFailures)
public java.nio.file.Path getReportDir()
public JkProjectTesting setReportDir(java.lang.String reportDir)
public void run()
public void runIfNeeded()
public JkTestProcessor createDefaultProcessor()
JkTestProcessor
object.