@Override
    public void onTestSkipped(ITestResult result) {
        super.onTestSkipped(result);
        //cleanup unneeded files
        Reporter reporter = (Reporter) result.getAttribute(REPORTER);
        if (reporter != null) {
            try {
                Files.deleteIfExists(Paths.get(new File(reporter.getDirectory(), reporter.getFileName() + ".html").getAbsolutePath()));
                Files.deleteIfExists(Paths.get(new File(reporter.getDirectory(), reporter.getFileName() + ".pdf").getAbsolutePath()));
            } catch (IOException e) {
                log.error("Unable to locate report. " + e);
            }
        }
    }
@ Override public void onTestSkipped ( ITestResult result ) { super . onTestSkipped ( result ) ; Reporter reporter = ( Reporter ) result . getAttribute ( REPORTER ) ; if ( reporter != null ) { try { Files . deleteIfExists ( Paths . get ( new File ( reporter . getDirectory ( ) , reporter . getFileName ( ) + ".html" ) . getAbsolutePath ( ) ) ) ; Files . deleteIfExists ( Paths . get ( new File ( reporter . getDirectory ( ) , reporter . getFileName ( ) + ".pdf" ) . getAbsolutePath ( ) ) ) ; } catch ( IOException e ) { log . error ( "Unable to locate report. " + e ) ; } } }
Runs the default TestNG onTestSkipped, and adds additional information
into the testng reporter

@param result - the testng itestresult object