public class JUnitTestRunner extends java.lang.Object implements junit.framework.TestListener, IJUnitTestRunner
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SUITE_METHODNAME |
| Constructor and Description |
|---|
JUnitTestRunner() |
JUnitTestRunner(ITestResultNotifier tr) |
| Modifier and Type | Method and Description |
|---|---|
void |
addError(junit.framework.Test test,
java.lang.Throwable t) |
void |
addFailure(junit.framework.Test test,
junit.framework.AssertionFailedError t) |
protected junit.framework.TestResult |
createTestResult()
Creates the TestResult to be used for the test run.
|
protected junit.framework.TestResult |
doRun(junit.framework.Test suite) |
void |
endTest(junit.framework.Test test) |
protected junit.framework.Test |
getTest(java.lang.Class testClass,
java.lang.String... methods)
Returns the Test corresponding to the given suite.
|
java.util.List<ITestNGMethod> |
getTestMethods()
Needed from TestRunner in order to figure out what JUnit test methods were run.
|
void |
run(java.lang.Class testClass,
java.lang.String... methods)
A
start implementation that ignores the TestResult |
protected void |
runFailed(java.lang.Class clazz,
java.lang.String message) |
void |
setInvokedMethodListeners(java.util.Collection<IInvokedMethodListener> listeners) |
void |
setTestResultNotifier(ITestResultNotifier notifier) |
junit.framework.TestResult |
start(java.lang.Class testCase,
java.lang.String... methods)
Starts a test run.
|
void |
startTest(junit.framework.Test test) |
public static final java.lang.String SUITE_METHODNAME
public JUnitTestRunner()
public JUnitTestRunner(ITestResultNotifier tr)
public java.util.List<ITestNGMethod> getTestMethods()
getTestMethods in interface IJUnitTestRunnerpublic void setTestResultNotifier(ITestResultNotifier notifier)
setTestResultNotifier in interface IJUnitTestRunnerpublic void startTest(junit.framework.Test test)
startTest in interface junit.framework.TestListenerTestListener.startTest(junit.framework.Test)public void addError(junit.framework.Test test,
java.lang.Throwable t)
addError in interface junit.framework.TestListenerTestListener.addError(junit.framework.Test, java.lang.Throwable)public void addFailure(junit.framework.Test test,
junit.framework.AssertionFailedError t)
addFailure in interface junit.framework.TestListenerTestListener.addFailure(junit.framework.Test, junit.framework.AssertionFailedError)public void endTest(junit.framework.Test test)
endTest in interface junit.framework.TestListenerTestListener.endTest(junit.framework.Test)public void setInvokedMethodListeners(java.util.Collection<IInvokedMethodListener> listeners)
setInvokedMethodListeners in interface IJUnitTestRunnerprotected junit.framework.Test getTest(java.lang.Class testClass,
java.lang.String... methods)
public void run(java.lang.Class testClass,
java.lang.String... methods)
start implementation that ignores the TestResultrun in interface IJUnitTestRunnertestClass - the JUnit test classpublic junit.framework.TestResult start(java.lang.Class testCase,
java.lang.String... methods)
protected void runFailed(java.lang.Class clazz,
java.lang.String message)
protected junit.framework.TestResult createTestResult()
protected junit.framework.TestResult doRun(junit.framework.Test suite)