Class MdcTestListener

  • All Implemented Interfaces:
    org.testng.IInvokedMethodListener, org.testng.ITestNGListener

    public class MdcTestListener
    extends java.lang.Object
    implements org.testng.IInvokedMethodListener
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String MDC_KEY_LOG  
      static java.lang.String MDC_KEY_TEST  
      static java.lang.String[] MDC_KEYS  
    • Constructor Summary

      Constructors 
      Constructor Description
      MdcTestListener()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterInvocation​(org.testng.IInvokedMethod method, org.testng.ITestResult testResult)  
      void beforeInvocation​(org.testng.IInvokedMethod method, org.testng.ITestResult testResult)  
      protected java.lang.String getName​(org.testng.ITestNGMethod m_method, java.lang.Object[] params)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MDC_KEYS

        public static final java.lang.String[] MDC_KEYS
    • Constructor Detail

      • MdcTestListener

        public MdcTestListener()
    • Method Detail

      • getName

        protected java.lang.String getName​(org.testng.ITestNGMethod m_method,
                                           java.lang.Object[] params)
      • beforeInvocation

        public void beforeInvocation​(org.testng.IInvokedMethod method,
                                     org.testng.ITestResult testResult)
        Specified by:
        beforeInvocation in interface org.testng.IInvokedMethodListener
      • afterInvocation

        public void afterInvocation​(org.testng.IInvokedMethod method,
                                    org.testng.ITestResult testResult)
        Specified by:
        afterInvocation in interface org.testng.IInvokedMethodListener