July 2019
Intermediate to advanced
536 pages
12h 57m
English
Each method can override the superclass version of the method to customize what users would want to see in the console or log file. You must remember to call the super equivalent if you do override the methods to be able to get the collection of test results. Here are a few examples of overridden methods in the new class:
/** * * onStart - method to log data before any tests start * * @param testContext */@Overridepublic void onStart(ITestContext testContext) { try { log("\nSuite Start Date: " + new SimpleDateFormat("MM.dd.yyyy.HH.mm.ss") .format(new Date()) + ".log"); } catch (Exception e) { e.printStackTrace(); } super.onStart(testContext);}
/** * onFinish - method to log data after all tests ...
Read now
Unlock full access