@Override public void testFailure(Failure failure) throws Exception { wrtie.write(failure.getTestHeader() + "\n"); wrtie.write(failure.getMessage() + "\n"); wrtie.write(failure.getTrace() + "\n"); super.testFailure(failure); }
@Override public void testRunFinished(Result result) throws Exception { try { if (wrtie != null) wrtie.close(); } catch (Exception e) { e.printStackTrace(); } super.testRunFinished(result); }
@Override public void testRunStarted(Description description) throws Exception { try { wrtie = new FileWriter("CustomerLogger.log"); } catch (IOException e) { e.printStackTrace(); } super.testRunStarted(description); }
@Override public void testFinished(Description description) throws Exception { wrtie.write(description.getMethodName() + " Finished its Execution" + "\n"); wrtie.write("======================================================" + "\n"); super.testFinished(description); }