Skip to content

Architecture

dipranjan edited this page Nov 25, 2018 · 8 revisions

The entire architecture can be broken down into 3 components:

  • TestNG listeners
  • Messaging System
  • Receiving system

TestNG listeners

If you have used TestNG or implemented Extent/Allure reporting with TestNG then you already are aware of the listener classes. In short TestNG listener always extends org.testng.ITestNGListener and TestNG provides us below listener types:

  • IExecutionListener
    
  • IAnnotationTransformer
    
  • ISuiteListener
    
  • ITestListener
    
  • IConfigurationListener
    
  • IMethodInterceptor
    
  • IInvokedMethodListener
    
  • IHookable
    
  • IReporter
    

Some of the methods which we have used from ITestListener are as follows:

  • onStart is invoked after the test class is instantiated and before any configuration method is called.

  • onTestSuccess is invoked on success of a test.

  • onTestFailure is invoked on failure of a test.

  • onTestSkipped is invoked whenever a test is skipped.

  • onTestFailedButWithinSuccessPercentage is invoked each time a method fails but is within the success percentage requested.

    onFinish is invoked after all the tests have run and all their Configuration methods have been called.

Clone this wiki locally