Пример #1
0
 @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);
 }
Пример #2
0
 @Override
 public void testRunFinished(Result result) throws Exception {
   try {
     if (wrtie != null) wrtie.close();
   } catch (Exception e) {
     e.printStackTrace();
   }
   super.testRunFinished(result);
 }
Пример #3
0
 @Override
 public void testRunStarted(Description description) throws Exception {
   try {
     wrtie = new FileWriter("CustomerLogger.log");
   } catch (IOException e) {
     e.printStackTrace();
   }
   super.testRunStarted(description);
 }
Пример #4
0
 @Override
 public void testFinished(Description description) throws Exception {
   wrtie.write(description.getMethodName() + " Finished its Execution" + "\n");
   wrtie.write("======================================================" + "\n");
   super.testFinished(description);
 }