1 package org.testng.reporters; 2 3 import org.testng.ITestResult; 4 import org.testng.TestListenerAdapter; 5 6 public class DotTestListener extends TestListenerAdapter { 7 private int m_count = 0; 8 9 @Override onTestFailure(ITestResult tr)10 public void onTestFailure(ITestResult tr) { 11 log("F"); 12 } 13 14 @Override onTestSkipped(ITestResult tr)15 public void onTestSkipped(ITestResult tr) { 16 log("S"); 17 } 18 19 @Override onTestSuccess(ITestResult tr)20 public void onTestSuccess(ITestResult tr) { 21 log("."); 22 } 23 log(String string)24 private void log(String string) { 25 System.out.print(string); 26 if (m_count++ % 40 == 0) { 27 System.out.println(""); 28 } 29 } 30 31 } 32