ItestListener

    0

    0

    Travis Williams

    This class implements the ITestNGListener interface. When a test fails, this class prints a message to the console.

    import org.testng.ITestNGListener;
    import org.testng.ITestResult;
    
    package Section11;
    
    import org.testng.ITestNGListener;
    import org.testng.ITestResult;
    public class L17_ITestListener implements ITestNGListener {
      public void onTestFailure(ITestResult result){
        System.out.println("Test has failed and this message is from the ItestListener inteface");
    
      }
    }
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.