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 net.sf.jameleon.TestCaseTag;
22  
23  import java.io.Writer;
24  import java.util.Calendar;
25  
26  /***
27   * Reports on a test run, including each script result.
28   */
29  public interface TestRunReporter {
30      /***
31       * Reports the result of the script.
32       * @param tct The test case of the script
33       * @param counter The test case counter of the test run
34       */
35      void reportScriptResult(TestCaseTag tct, TestCaseCounter counter);
36  
37      /***
38       * Reports the start of a test run.
39       * @param startTime The time the test run was kicked off
40       */
41      void reportTestRunStart(Calendar startTime);
42  
43      /***
44       * Reports the completion of a test run.
45       * @param startTime The time the test run began
46       * @param endTime The time the test run was completed
47       * @param counter The number of test cases run passed and failed.
48       */
49      void reportTestRunComplete(Calendar startTime, Calendar endTime, TestCaseCounter counter);
50  
51      /***
52       * Cleans up any resources used
53       */
54      void cleanUp();
55  
56      /***
57       * Gets the Writer to use to write to results to
58       * @return The Writer to use to write to results to
59       */
60      Writer getWriter();
61  
62      /***
63       * Sets the Writer to use to write to results to
64       * @param writer The Writer to use to write to results to
65       */
66      void setWriter(Writer writer);
67  }