How to use and implement TestNG Listeners
File: KWTestNG.java
File: KWListener.java
Output
[RemoteTestNG] detected TestNG version 7.0.0 Executing Method: KWTestNG.OpenBrowser()[pri:0, instance:tests.KWTestNG@52a86356] Pass: OpenBrowser Executing Method: KWTestNG.Login()[pri:1, instance:tests.KWTestNG@52a86356] Pass: Login Executing Method: KWTestNG.VerifyTitle()[pri:2, instance:tests.KWTestNG@52a86356] Login Successful Pass: VerifyTitle PASSED: OpenBrowser PASSED: Login PASSED: VerifyTitle =============================================== Default test Tests run: 3, Failures: 0, Skips: 0 =============================================== =============================================== Default suite Total tests run: 3, Passes: 3, Failures: 0, Skips: 0 ===============================================
File: testng.xml
Advertisement