TestNG_ConsoleRunner.java

The following code is for the TestNG_ConsoleRunner.java class:

import org.testng.ITestContext;import org.testng.ITestResult;import org.testng.TestListenerAdapter;import java.io.*;import java.text.DateFormat;import java.text.SimpleDateFormat;import java.util.Date;/** * @author Carl Cocchiaro * * TestNG Listener Utility Class * */public class TestNG_ConsoleRunner extends TestListenerAdapter {    private static String logFile = null;    /**     * onStart method     *     * @param testContext     */    @Override    public void onStart(ITestContext testContext) {        super.onStart(testContext);    }    /**     * onFinish method     *     * @param testContext     */    @Override    public void onFinish(ITestContext testContext) {        log("\nTotal Passed = "            + getPassedTests().size() ...

Get Selenium Framework Design in Data-Driven Testing now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.