public final class JkUnit
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
JkUnit.JunitReportDetail
Detail level for the junit report.
|
Modifier and Type | Method and Description |
---|---|
JkJavaProcess |
getForkedProcess()
Returns the process description if this launcher is withForking.
|
JkUnit.JunitReportDetail |
getReportDetail()
Returns the report detail level for this launcher.
|
java.nio.file.Path |
getReportDir()
Returns the output report dir.
|
boolean |
isForked()
Returns
true if this launcher is withForking. |
static JkUnit |
of()
Returns an empty junit launcher launcher without classpath set on.
|
JkTestSuiteResult |
run(JkClasspath classpath,
JkPathTree classesToTest) |
JkTestSuiteResult |
run(JkClasspath classpath,
JkPathTreeSet classesToTest) |
JkTestSuiteResult |
run(JkJavaTestClasses testSpec)
Runs specified test bulk.
|
JkUnit |
withBreakOnFailure(boolean crashOnFailure)
Returns a copy of this launcher but that fail fast on the first failure.
|
JkUnit |
withForking()
Short-hand to #withForking(true)
|
JkUnit |
withForking(boolean fork)
Creates an identical JkUnit to this one but specifying the withForking mode.
|
JkUnit |
withForking(JkJavaProcess process)
Creates a withForking JkUnit from this one but using the specified process.
|
JkUnit |
withForking(java.nio.file.Path workingDir) |
JkUnit |
withOutputOnConsole(boolean outputOnConsole)
Returns an enhanced copy of this launcher but specifying if the output should be displayed on console.
|
JkUnit |
withPostAction(java.lang.Runnable runnable)
Returns a copy of this launcher but specifying an action to run at the end of execution.
|
JkUnit |
withReport(JkUnit.JunitReportDetail reportDetail)
Returns a copy of this launcher but with the specified report detail.
|
JkUnit |
withReportDir(java.nio.file.Path reportDir)
Returns a copy of this launcher but with the specified report directory output.
|
public static JkUnit of()
public JkUnit withReport(JkUnit.JunitReportDetail reportDetail)
public JkUnit withReportDir(java.nio.file.Path reportDir)
public JkUnit withBreakOnFailure(boolean crashOnFailure)
public JkUnit withPostAction(java.lang.Runnable runnable)
public JkUnit withForking(JkJavaProcess process)
appendClasspath
is true
then the classpath
already defined in this object is appended to the specified process
classpath.public JkUnit withForking(java.nio.file.Path workingDir)
public JkUnit withForking()
public JkUnit withForking(boolean fork)
true then default JkJavaProcess
is used to run the tests (java process launched without any option).
public JkUnit withOutputOnConsole(boolean outputOnConsole)
public boolean isForked()
true
if this launcher is withForking.public JkUnit.JunitReportDetail getReportDetail()
public java.nio.file.Path getReportDir()
public JkJavaProcess getForkedProcess()
public JkTestSuiteResult run(JkJavaTestClasses testSpec)
public JkTestSuiteResult run(JkClasspath classpath, JkPathTreeSet classesToTest)
public JkTestSuiteResult run(JkClasspath classpath, JkPathTree classesToTest)