How many listeners are there in TestNG?

How many listeners are there in TestNG?

There are two TestNG listeners in the parent class.

  1. The onTestSuccess() function, which is called when the test case is successful.
  2. The onTestFailure() function, which is called when the test case fails.