Author: janne.t.harkonen
Date: Tue Apr 14 04:07:42 2009
New Revision: 1799
Modified:
trunk/doc/userguide/src/ExtendingRobotFramework/ListenerInterface.txt
Log:
Rewrote chapter on listeners
Modified:
trunk/doc/userguide/src/ExtendingRobotFramework/ListenerInterface.txt
==============================================================================
--- trunk/doc/userguide/src/ExtendingRobotFramework/ListenerInterface.txt
(original)
+++ trunk/doc/userguide/src/ExtendingRobotFramework/ListenerInterface.txt
Tue Apr 14 04:07:42 2009
@@ -55,8 +55,13 @@
implement any official interface, and it only needs to have the methods it
actually needs.
+The signatures of methods related to test execution progress were changed
in Robot Framework 2.1.
+The old signatures will continue to work, but they will be deprecated in
some future version, so all new
+listeners should be implemented with signatures described in the table
below. The most recent detailed
+description of the old listener interface can be found in User Guide of
Robot Framework 2.0.4.
+
Starting from Robot Framework 2.1, all listener methods related to test
execution
-progress have the same signature :code:`method`(name, attributes), where
+progress have the same signature :code:`method(name, attributes)`, where
:code:`attributes` is a dictionary containing details of the event. The
following table lists all the available methods in the listener interface,
and
the contents of the :code:`attributes` dictionary, where applicable. Keys
of
@@ -67,29 +72,32 @@
:class: tabular
+---------------+------------------+--------------------------------------------------+
- | Method | Arguments |
Attributes |
+ | Method | Arguments |
Attributes/Explanation |
+===============+==================+==================================================+
- | start_suite | name, attributes | 'doc' is the documentation of the
suite, which |
- | | | may be
empty. |
+ | start_suite | name, attributes | Keys in the attributes
dictionary: |
+ | | | * 'doc': suite documentation, may
be empty |
+
+---------------+------------------+--------------------------------------------------+
+ | end_suite | name, attributes | Keys in the attributes
dictionary: |
+ | | | * 'status': either PASS or
FAIL. |
+ | | | * 'message': suite statistics and
an error |
+ | | | message, if the suite setup or
teardown has |
+ | | |
failed |
+
+---------------+------------------+--------------------------------------------------+
+ | start_test | name, attributes | Keys in the attributes
dictionary: |
+ | | | * 'doc': test documentation, may
be empty. |
+ | | | * 'tags': contains the tags of
the |
+ | | | test case, given as a list of
strings. |
+
+---------------+------------------+--------------------------------------------------+
+ | end_test | name, attributes | Keys in the attributes
dictionary: |
+ | | | * 'status': either PASS or
FAIL. |
+ | | | * 'message': contains an error
message, if the |
+ | | | test has failed and is empty
otherwise. |
+---------------+------------------+--------------------------------------------------+
- | end_suite | name, attributes | 'status' is either PASS or
FAIL. 'message' |
- | | | contains suite statistics and an
error message, |
- | | | if the suite setup or teardown has
failed. |
-
+---------------+------------------+--------------------------------------------------+
- | start_test | name, attributes | 'doc' is the documentation of the
test, which |
- | | | may be empty. 'tags' contains the
tags of the |
- | | | test case, given as a list of
strings. |
-
+---------------+------------------+--------------------------------------------------+
- | end_test | name, attributes | 'status' is either PASS or
FAIL. 'message' |
- | | | contains an error message, if the
test has |
- | | | failed and is empty
otherwise. |
-
+---------------+------------------+--------------------------------------------------+
- | start_keyword | name, attributes | 'args' contains the keyword
arguments, given as |
- | | | a list of strings.
Available |
- | | | from Robot Framework 2.0.2
onwards. |
+ | start_keyword | name, attributes | Keys in the attributes
dictionary: |
+ | | | * 'args': keyword arguments, a
list of strings. |
+---------------+------------------+--------------------------------------------------+
- | end_keyword | name, attributes | 'status' is either PASS or FAIL.
Available |
- | | | from Robot Framework 2.0.2
onwards. |
+ | end_keyword | name, attributes | Keys in the attributes
dictionary: |
+ | | | * 'status': either PASS or
FAIL. |
+---------------+------------------+--------------------------------------------------+
| output_file | path | Called when writing to an output
file is |
| | | finished. The path is an absolute
path to the |