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 Learn Selenium now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.