Commit cfbabad6 authored by Martti Käärik's avatar Martti Käärik
Browse files

Added reporting tester name to Reporter API.

parent b5e70e24
Loading
Loading
Loading
Loading
+12 −11
Original line number Diff line number Diff line
@@ -7,46 +7,47 @@ public interface Reporter {
	/**
	 * Log comments as specified in TDL model. Comments are logged before the
	 * execution of the associated element.
	 * @param tester Name of the reporting tester component.
	 */
	void comment(String body);
	void comment(String tester, String body);

	/**
	 * Log test objective associated with a behaviour element as specified in TDL
	 * model. Test objectives are logged after the execution of the associated
	 * behaviour.
	 * 
	 * @param tester Name of the reporting tester component.
	 * @param uri         URI of the objective.
	 * @param description Description of the objective.
	 */
	void testObjectiveReached(String uri, String description);
	void testObjectiveReached(String tester, String uri, String description);

	/**
	 * Log the start of a behaviour execution.
	 * 
	 * @param tester Name of the reporting tester component.
	 * @param kind       Name of behaviour element meta-class as specified in TDL.
	 * @param id         Locally unique identifier of the behaviour element (to be
	 *                   matched with {@link #behaviourCompleted(String)
	 *                   matched with {@link #behaviourCompleted(String, String)
	 *                   behaviourCompleted()}).
	 * @param properties Any behaviour specific properties.
	 */
	void behaviourStarted(String kind, String id, Object... properties);
	void behaviourStarted(String tester, String kind, String id, Object... properties);

	/**
	 * Log the completion of a behaviour execution.
	 * 
	 * @param tester Name of the reporting tester component.
	 * @param id Locally unique identifier of the behaviour element (to be matched
	 *           with {@link #behaviourStarted(String, String, Object...)
	 *           with {@link #behaviourStarted(String, String, String, Object...)
	 *           behaviourStarted()}).
	 */
	void behaviourCompleted(String id);
	void behaviourCompleted(String tester, String id);

	/**
	 * Log a runtime error. Runtime errors result in the termination of test
	 * execution. Note that it is not the responsibility of the logger to handle the
	 * errors in any way except logging them.
	 * 
	 * @param tester Name of the reporting tester component.
	 * @param t The exception that was thrown by the execution engine or any of the
	 *          adapters.
	 */
	void runtimeError(Throwable t);
	void runtimeError(String tester, Throwable t);
}