Package org.testng.junit
Class JUnit4TestRunner
java.lang.Object
org.testng.junit.JUnit4TestRunner
- All Implemented Interfaces:
IJUnitTestRunner
A JUnit TestRunner that records/triggers all information/events necessary to TestNG.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Map<org.junit.runner.Description,
ITestResult> private Collection<IInvokedMethodListener>
private List<ITestListener>
private List<ITestNGMethod>
private ITestResultNotifier
Fields inherited from interface org.testng.junit.IJUnitTestRunner
JUNIT_4_TESTRUNNER, JUNIT_TESTRUNNER
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate ITestResult
createTestResult
(org.junit.runner.Description test) Needed from TestRunner in order to figure out what JUnit test methods were run.private static boolean
isAssumptionFailed
(org.junit.runner.notification.Failure failure) void
Astart
implementation that ignores theTestResult
void
void
setTestResultNotifier
(ITestResultNotifier notifier) org.junit.runner.Result
Starts a test run.
-
Field Details
-
m_parentRunner
-
m_methods
-
m_listeners
-
m_invokeListeners
-
m_findedMethods
-
-
Constructor Details
-
JUnit4TestRunner
public JUnit4TestRunner() -
JUnit4TestRunner
-
-
Method Details
-
getTestMethods
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
-
setTestResultNotifier
- Specified by:
setTestResultNotifier
in interfaceIJUnitTestRunner
-
setInvokedMethodListeners
- Specified by:
setInvokedMethodListeners
in interfaceIJUnitTestRunner
-
run
Astart
implementation that ignores theTestResult
- Specified by:
run
in interfaceIJUnitTestRunner
- Parameters:
testClass
- the JUnit test class
-
start
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
-
isAssumptionFailed
private static boolean isAssumptionFailed(org.junit.runner.notification.Failure failure)
-