Package org.testng.junit
Class JUnit4TestRunner
- java.lang.Object
-
- org.testng.junit.JUnit4TestRunner
-
- All Implemented Interfaces:
IJUnitTestRunner
@Deprecated public class JUnit4TestRunner extends java.lang.Object implements IJUnitTestRunner
Deprecated.- Support for running JUnit tests stands deprecated as of TestNG7.7.0
A JUnit TestRunner that records/triggers all information/events necessary to TestNG.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
JUnit4TestRunner.RL
Deprecated.
-
Field Summary
Fields Modifier and Type Field Description private ITestListener
m_exitCodeListener
Deprecated.private java.util.Map<org.junit.runner.Description,ITestResult>
m_foundMethods
Deprecated.private java.util.Collection<IInvokedMethodListener>
m_invokeListeners
Deprecated.private java.util.List<ITestListener>
m_listeners
Deprecated.private java.util.List<ITestNGMethod>
m_methods
Deprecated.private ITestResultNotifier
m_parentRunner
Deprecated.private ITestObjectFactory
objectFactory
Deprecated.
-
Constructor Summary
Constructors Constructor Description JUnit4TestRunner(ITestObjectFactory objectFactory, ITestResultNotifier tr)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description private ITestResult
createTestResult(ITestObjectFactory objectFactory, org.junit.runner.Description test)
Deprecated.java.util.List<ITestNGMethod>
getTestMethods()
Deprecated.Needed from TestRunner in order to figure out what JUnit test methods were run.private static boolean
isAssumptionFailed(org.junit.runner.notification.Failure failure)
Deprecated.void
run(java.lang.Class testClass, java.lang.String... methods)
Deprecated.Astart
implementation that ignores theTestResult
void
setInvokedMethodListeners(java.util.Collection<IInvokedMethodListener> listeners)
Deprecated.org.junit.runner.Result
start(java.lang.Class testCase, java.lang.String... methods)
Deprecated.Starts a test run.-
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 Detail
-
objectFactory
private final ITestObjectFactory objectFactory
Deprecated.
-
m_parentRunner
private final ITestResultNotifier m_parentRunner
Deprecated.
-
m_listeners
private final java.util.List<ITestListener> m_listeners
Deprecated.
-
m_methods
private final java.util.List<ITestNGMethod> m_methods
Deprecated.
-
m_invokeListeners
private java.util.Collection<IInvokedMethodListener> m_invokeListeners
Deprecated.
-
m_foundMethods
private final java.util.Map<org.junit.runner.Description,ITestResult> m_foundMethods
Deprecated.
-
m_exitCodeListener
private final ITestListener m_exitCodeListener
Deprecated.
-
-
Constructor Detail
-
JUnit4TestRunner
public JUnit4TestRunner(ITestObjectFactory objectFactory, ITestResultNotifier tr)
Deprecated.
-
-
Method Detail
-
getTestMethods
public java.util.List<ITestNGMethod> 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
-
setInvokedMethodListeners
public void setInvokedMethodListeners(java.util.Collection<IInvokedMethodListener> listeners)
Deprecated.- Specified by:
setInvokedMethodListeners
in interfaceIJUnitTestRunner
-
run
public void run(java.lang.Class testClass, java.lang.String... methods)
Deprecated.Astart
implementation that ignores theTestResult
- Specified by:
run
in interfaceIJUnitTestRunner
- Parameters:
testClass
- the JUnit test class
-
start
public org.junit.runner.Result start(java.lang.Class testCase, java.lang.String... methods)
Deprecated.Starts a test run. Analyzes the command line arguments and runs the given test suite.- Parameters:
testCase
- The test classmethods
- The test methods- Returns:
- The result
-
createTestResult
private ITestResult createTestResult(ITestObjectFactory objectFactory, org.junit.runner.Description test)
Deprecated.
-
isAssumptionFailed
private static boolean isAssumptionFailed(org.junit.runner.notification.Failure failure)
Deprecated.
-
-