# Interface TestListener

public interface TestListener
Interface for listening to test execution. The intent is to be framework agnostic. Currently this interface can support feedback from JUnit and TestNG tests.

Note that the `beforeSuite(TestDescriptor)` method will be called at 3 different times:

1. Before the test task executes any tests
2. Each time a test worker is started before it executes any tests
3. Before each "test suite" as defined by the testing framework is executed (for JVM, this typically means prior to every test class)

Since:
  0.9

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default void`
  `afterSuite(TestDescriptor suite, TestResult result)`
  Called after a test suite is finished.
  `default void`
  `afterTest(TestDescriptor testDescriptor, TestResult result)`
  Called after an atomic test is finished.
  `default void`
  `beforeSuite(TestDescriptor suite)`
  Called before a test suite is started.
  `default void`
  `beforeTest(TestDescriptor testDescriptor)`
  Called before an atomic test is started.

- ## Method Details

  - ### beforeSuite

    default void beforeSuite(TestDescriptor suite)
    Called before a test suite is started.
    Parameters:
      `suite` - The suite whose tests are about to be executed.
    Since:
      0.9

  - ### afterSuite

    default void afterSuite(TestDescriptor suite, TestResult result)
    Called after a test suite is finished.
    Parameters:
      `suite` - The suite whose tests have finished being executed.
      `result` - The aggregate result for the suite.
    Since:
      0.9

  - ### beforeTest

    default void beforeTest(TestDescriptor testDescriptor)
    Called before an atomic test is started.
    Parameters:
      `testDescriptor` - The test which is about to be executed.
    Since:
      0.9

  - ### afterTest

    default void afterTest(TestDescriptor testDescriptor, TestResult result)
    Called after an atomic test is finished.
    Parameters:
      `testDescriptor` - The test which has finished executing.
      `result` - The test result.
    Since:
      0.9