Class 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 TestNG 7.7.0
    A JUnit TestRunner that records/triggers all information/events necessary to TestNG.
    • Field Detail

      • m_listeners

        private final java.util.List<ITestListener> m_listeners
        Deprecated.
      • m_methods

        private final java.util.List<ITestNGMethod> m_methods
        Deprecated.
      • m_foundMethods

        private final java.util.Map<org.junit.runner.Description,​ITestResult> m_foundMethods
        Deprecated.
      • m_exitCodeListener

        private final ITestListener m_exitCodeListener
        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 interface IJUnitTestRunner
        Returns:
        the list of all JUnit test methods run
      • run

        public void run​(java.lang.Class testClass,
                        java.lang.String... methods)
        Deprecated.
        A start implementation that ignores the TestResult
        Specified by:
        run in interface IJUnitTestRunner
        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 class
        methods - The test methods
        Returns:
        The result
      • isAssumptionFailed

        private static boolean isAssumptionFailed​(org.junit.runner.notification.Failure failure)
        Deprecated.