View Javadoc

1   /*
2       Jameleon - An automation testing tool..
3       Copyright (C) 2007 Christian W. Hargraves (engrean@hotmail.com)
4   
5       This library is free software; you can redistribute it and/or
6       modify it under the terms of the GNU Lesser General Public
7       License as published by the Free Software Foundation; either
8       version 2.1 of the License, or (at your option) any later version.
9   
10      This library is distributed in the hope that it will be useful,
11      but WITHOUT ANY WARRANTY; without even the implied warranty of
12      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13      Lesser General Public License for more details.
14  
15      You should have received a copy of the GNU Lesser General Public
16      License along with this library; if not, write to the Free Software
17      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  */
19  package net.sf.jameleon.reporting;
20  
21  import java.io.Writer;
22  import java.util.Calendar;
23  
24  /***
25   * Reports on a test run, including each script result.
26   */
27  public interface TestRunSummaryReporter {
28  
29      /***
30       * Reports the start of a test run.
31       * @param startTime The time the test run was kicked off
32       */
33      void reportTestRunStart(Calendar startTime);
34  
35      /***
36       * Reports the completion of a test run.
37       * @param startTime The time the test run began
38       * @param endTime The time the test run was completed
39       * @param counter The number of test cases run passed and failed.
40       */
41      void reportTestRunComplete(Calendar startTime, Calendar endTime, TestCaseCounter counter);
42  
43      /***
44       * Cleans up any resources used
45       */
46      void cleanUp();
47  
48      /***
49       * Gets the Writer to use to write to results to
50       * @return The Writer to use to write to results to
51       */
52      Writer getWriter();
53  
54      /***
55       * Sets the Writer to use to write to results to
56       * @param writer The Writer to use to write to results to
57       */
58      void setWriter(Writer writer);
59  
60      /***
61       * Tells whether to print the header or not.
62       * @return true to print the header.
63       */
64      boolean isPrintHeader();
65  
66      /***
67       * Sets the option to print the header or not.
68       * @param printHeader Set to true to print the header.
69       */
70      void setPrintHeader(boolean printHeader);
71  }