public class MyTestNGListener implements ITestListener{
public void ontestfailure(ITestResult result){
System.out.println(" test failed");
System.out.println(result.getName());
System.out.println(result.getStatus());
System.out.println(result.getThrowable().getMessage());
}
public void ontestsuccess(ITestResult result){
System.out.println("test passed" +result.getName());
Instructor
Ashish Thakur Replied on 15/06/2021
Which version of testng are you using?
Im using 6.9.10
Please can u update me on this issue
Instructor
Ashish Thakur Replied on 30/06/2021
Please use 7.0
Sorry for delay