Package org.testng.junit
Class JUnitTestRunner
java.lang.Object
org.testng.junit.JUnitTestRunner
- All Implemented Interfaces:
junit.framework.TestListener
,IJUnitTestRunner
@Deprecated
public class JUnitTestRunner
extends Object
implements junit.framework.TestListener, IJUnitTestRunner
Deprecated.
A JUnit TestRunner that records/triggers all information/events necessary to TestNG.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Collection
<IInvokedMethodListener> Deprecated.private final List
<ITestNGMethod> Deprecated.private final ITestObjectFactory
Deprecated.private final ITestResultNotifier
Deprecated.private final Map
<junit.framework.Test, JUnitTestRunner.TestRunInfo> Deprecated.static final String
Deprecated. -
Constructor Summary
ConstructorsConstructorDescriptionJUnitTestRunner
(ITestObjectFactory objectFactory, ITestResultNotifier tr) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.void
addFailure
(junit.framework.Test test, junit.framework.AssertionFailedError t) Deprecated.protected junit.framework.TestResult
Deprecated.Creates the TestResult to be used for the test run.protected junit.framework.TestResult
doRun
(junit.framework.Test suite) Deprecated.void
endTest
(junit.framework.Test test) Deprecated.protected junit.framework.Test
Deprecated.Returns the Test corresponding to the given suite.Deprecated.Needed from TestRunner in order to figure out what JUnit test methods were run.private void
recordFailure
(junit.framework.Test test, Throwable t) Deprecated.private TestResult
recordResults
(junit.framework.Test test, JUnitTestRunner.TestRunInfo tri) Deprecated.void
Deprecated.Astart
implementation that ignores theTestResult
protected void
Deprecated.void
Deprecated.junit.framework.TestResult
Deprecated.Starts a test run.void
startTest
(junit.framework.Test test) Deprecated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.testng.junit.IJUnitTestRunner
setTestResultNotifier
-
Field Details
-
SUITE_METHODNAME
Deprecated.- See Also:
-
m_objectFactory
Deprecated. -
m_parentRunner
Deprecated. -
m_tests
Deprecated. -
m_methods
Deprecated. -
m_invokedMethodListeners
Deprecated.
-
-
Constructor Details
-
JUnitTestRunner
Deprecated.
-
-
Method Details
-
getTestMethods
Deprecated.Needed from TestRunner in order to figure out what JUnit test methods were run.- Specified by:
getTestMethods
in interfaceIJUnitTestRunner
- Returns:
- the list of all JUnit test methods run
-
startTest
public void startTest(junit.framework.Test test) Deprecated.- Specified by:
startTest
in interfacejunit.framework.TestListener
- See Also:
-
addError
Deprecated.- Specified by:
addError
in interfacejunit.framework.TestListener
- See Also:
-
addFailure
public void addFailure(junit.framework.Test test, junit.framework.AssertionFailedError t) Deprecated.- Specified by:
addFailure
in interfacejunit.framework.TestListener
- See Also:
-
recordFailure
Deprecated. -
endTest
public void endTest(junit.framework.Test test) Deprecated.- Specified by:
endTest
in interfacejunit.framework.TestListener
- See Also:
-
setInvokedMethodListeners
Deprecated.- Specified by:
setInvokedMethodListeners
in interfaceIJUnitTestRunner
-
recordResults
Deprecated. -
getTest
protected junit.framework.Test getTest(Class<? extends junit.framework.Test> testClass, String... methods) Deprecated.Returns the Test corresponding to the given suite. This is a template method, subclasses override runFailed(), clearStatus().- Parameters:
testClass
- The test classmethods
- The test methods- Returns:
- The corresponding Test
-
run
Deprecated.Astart
implementation that ignores theTestResult
- Specified by:
run
in interfaceIJUnitTestRunner
- Parameters:
testClass
- the JUnit test class
-
start
Deprecated.Starts a test run. Analyzes the command line arguments and runs the given test suite.- Parameters:
testCase
- The test class to runmethods
- The test methods to run- Returns:
- The test result
-
runFailed
Deprecated. -
createTestResult
protected junit.framework.TestResult createTestResult()Deprecated.Creates the TestResult to be used for the test run.- Returns:
- The created test result
-
doRun
protected junit.framework.TestResult doRun(junit.framework.Test suite) Deprecated.
-
7.7.0