Class ThreadLeakDetectorListener

  • All Implemented Interfaces:
    org.testng.IClassListener, org.testng.ITestListener, org.testng.ITestNGListener

    public class ThreadLeakDetectorListener
    extends java.lang.Object
    Detects new threads that have been created during the test execution.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onBeforeClass​(org.testng.ITestClass testClass)  
      protected void onBetweenTestClasses​(java.lang.Class<?> endedTestClass, java.lang.Class<?> startedTestClass)
      Call back hook for adding logic when test execution moves from test class to another.
      void onFinish​(org.testng.ITestContext context)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.testng.IClassListener

        onAfterClass
      • Methods inherited from interface org.testng.ITestListener

        onStart, onTestFailedButWithinSuccessPercentage, onTestFailedWithTimeout, onTestFailure, onTestSkipped, onTestStart, onTestSuccess
    • Constructor Detail

      • ThreadLeakDetectorListener

        public ThreadLeakDetectorListener()
    • Method Detail

      • onBetweenTestClasses

        protected void onBetweenTestClasses​(java.lang.Class<?> endedTestClass,
                                            java.lang.Class<?> startedTestClass)
        Call back hook for adding logic when test execution moves from test class to another.
        Parameters:
        endedTestClass - the test class which has finished execution. null if the started test class is the first
        startedTestClass - the test class which has started execution. null if the ended test class is the last
      • onBeforeClass

        public void onBeforeClass​(org.testng.ITestClass testClass)
        Specified by:
        onBeforeClass in interface org.testng.IClassListener
      • onFinish

        public void onFinish​(org.testng.ITestContext context)
        Specified by:
        onFinish in interface org.testng.ITestListener