Package de.hybris.ant.taskdefs.yunit
Interface JUnitTaskMirror
- All Known Implementing Classes:
JUnitTaskMirrorImpl
public interface JUnitTaskMirror
Handles the portions of
JUnitTask which need to directly access actual JUnit classes, so that junit.jar need
not be on Ant's startup classpath. Neither JUnitTask.java nor JUnitTaskMirror.java nor their transitive static deps
may import any junit.** classes! Specifically, need to not refer to - JUnitResultFormatter or its subclasses -
JUnitVersionHelper - JUnitTestRunner Cf. JUnitTask.SplitLoader#isSplit(String) Public only to permit access from
classes in this package; do not use directly.- Since:
- 1.7
- See Also:
-
- "bug #38799"
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceThe interface that JUnitResultFormatter extends.static interfaceInterface that test runners implement.static interfaceThe interface that SummaryJUnitResultFormatter extends. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddVmExit(JUnitTest test, JUnitTaskMirror.JUnitResultFormatterMirror formatter, OutputStream out, String message, String testCase) Add the formatter to be called when the jvm exits before the test suite finishs.newJUnitTestRunner(String platformHome, String classpath, String webClasspath, JUnitTest test, boolean haltOnError, boolean filterTrace, boolean haltOnFailure, boolean showOutput, boolean logTestListenerEvents, org.apache.tools.ant.AntClassLoader classLoader, boolean suppressJunitTenant) Create a new test runner for a test.Create a summary result formatter.
-
Method Details
-
addVmExit
void addVmExit(JUnitTest test, JUnitTaskMirror.JUnitResultFormatterMirror formatter, OutputStream out, String message, String testCase) Add the formatter to be called when the jvm exits before the test suite finishs.- Parameters:
test- the test.formatter- the fomatter to use.out- the output stream to use.message- the message to write out.testCase- the name of the test.
-
newJUnitTestRunner
JUnitTaskMirror.JUnitTestRunnerMirror newJUnitTestRunner(String platformHome, String classpath, String webClasspath, JUnitTest test, boolean haltOnError, boolean filterTrace, boolean haltOnFailure, boolean showOutput, boolean logTestListenerEvents, org.apache.tools.ant.AntClassLoader classLoader, boolean suppressJunitTenant) Create a new test runner for a test.- Parameters:
test- the test to run.haltOnError- if true halt the tests if an error occurs.filterTrace- if true filter the stack traces.haltOnFailure- if true halt the test if a failure occurs.showOutput- if true show output.logTestListenerEvents- if true log test listener events.classLoader- the classloader to use to create the runner.suppressJunitTenant- if true, junit tenant will not be started- Returns:
- the test runner.
-
newSummaryJUnitResultFormatter
JUnitTaskMirror.SummaryJUnitResultFormatterMirror newSummaryJUnitResultFormatter()Create a summary result formatter.- Returns:
- the created formatter.
-