Author: pekka.klarck
Date: Sun Mar 22 11:13:11 2009
New Revision: 1474

Modified:
   trunk/doc/userguide/src/ExecutingTestCases/BasicUsage.txt
   trunk/doc/userguide/src/ExtendingRobotFramework/CreatingTestLibraries.txt

Log:
Enhancements for explaining Test Execution Errors

Modified: trunk/doc/userguide/src/ExecutingTestCases/BasicUsage.txt
==============================================================================
--- trunk/doc/userguide/src/ExecutingTestCases/BasicUsage.txt   (original)
+++ trunk/doc/userguide/src/ExecutingTestCases/BasicUsage.txt Sun Mar 22 11:13:11 2009
@@ -223,17 +223,31 @@
 Errors and warnings during execution
 ''''''''''''''''''''''''''''''''''''

-It is possible that during the test execution there are some
-unexpected problems that are not actually related to test cases. There
-could, for example, be problems importing a test library or resource
-file or some executed keyword could be deprecated__. Depending on the
-severity such problems are either errors or warnings and they are
-written into the console (using the standard error stream), shown on a
-separate *Test Execution Errors* section in log files, and also written
-into Robot Framework's own `system log`_.
+During the test execution there can be unexpected problems like
+failing to import a library or a resource file or a keyword being
+deprecated__. Depending on the severity such problems are categorized
+as errors or warnings and they are written into the console (using the
+standard error stream), shown on a separate *Test Execution Errors*
+section in log files, and also written into Robot Framework's own
+`system log`_. Normally these errors are generated by Robot Framework
+core, but libraries can use `log level WARN`__ to write warnings.
+Example below illustrates how errors and warnings look like in the log
+file.

-.. tip:: It is possible to use `log level WARN`__ to write this kind
-         of warning messages from test libraries.
+.. raw:: html
+
+   <table class="messages">
+     <tr>
+       <td class="time">20090322&nbsp;19:58:42.528</td>
+       <td class="error level">ERROR</td>
+ <td class="msg">Error in file '/home/robot/tests.html' in table 'Setting' in element on row 2: Resource file 'resource.html' does not exist</td>
+     </tr>
+     <tr>
+       <td class="time">20090322&nbsp;19:58:43.931</td>
+       <td class="warn level">WARN</td>
+ <td class="msg">Keyword 'SomeLibrary.Example Keyword' is deprecated. Use keyword `Other Keyword` instead.</td>
+     </tr>
+   </table>

 __ `Deprecating keywords`_
 __ `Logging information`_

Modified: trunk/doc/userguide/src/ExtendingRobotFramework/CreatingTestLibraries.txt
==============================================================================
--- trunk/doc/userguide/src/ExtendingRobotFramework/CreatingTestLibraries.txt (original) +++ trunk/doc/userguide/src/ExtendingRobotFramework/CreatingTestLibraries.txt Sun Mar 22 11:13:11 2009
@@ -658,14 +658,13 @@
 Warnings
 ````````
 Starting from Robot Framework 2.1 messages with :msg:`WARN` level are
-automatically written into `the console and separate Test Execution
+automatically written into `the console and into separate Test Execution
 Errors section`__ in log files. This makes warnings more visible than
 other messages and allows using them for reporting important but
 non-critical problems to users.

 __ `Errors and warnings during execution`_

-
 Logging HTML
 ````````````
 Everything normally logged by the library will be converted into a
@@ -957,11 +956,12 @@
 marking these keywords *deprecated*. This makes it easier to find old
 keywords from the test data and remove or replace them.

-Keywords are deprecated by starting their documentation with
-:code:`*DEPRECATED*`. When these keywords are executed, a warning containing rest -of the `short documentation`__ is written into the syslog_ and the `log file`_.
-For example, if following keyword is executed there will be a warning like
-shown below in the log file.
+Keywords are deprecated by starting their documentation with
+:code:`*DEPRECATED*`. When these keywords are executed, a warning
+containing rest of the `short documentation`__ is written both into
+`the console and into separate Test Execution Errors section`__ in log
+files.  For example, if following keyword is executed there will be a
+warning like shown below in the log file.

 .. sourcecode:: python

@@ -982,20 +982,22 @@
      </tr>
    </table>

-This deprecation system works with most test libraries and also with `user keywords`__. -The only exception are keywords implemented in a Java test library that uses -the `static library interface`__ because their documentation is not available -at runtime. With such keywords, it possible to use user keywords as wrappers and
-deprecate them.
+This deprecation system works with most test libraries and also with
+`user keywords`__.  The only exception are keywords implemented in a
+Java test library that uses the `static library interface`__ because
+their documentation is not available at runtime. With such keywords,
+it possible to use user keywords as wrappers and deprecate them.

 There is a plan to implement a tool that can use the deprecation
-information for automatically replacing deprecated keywords. The tool will most -likely get the name of the new keyword from the documentation so that it searches -words inside backticks (:code:`\``). Thus it would find :name:`Other Keyword` from -the earlier example. Note that `libdoc.py`_ also automatically creates internal
-links using the same syntax.
+information for automatically replacing deprecated keywords. The tool
+will most likely get the name of the new keyword from the
+documentation so that it searches words inside backticks
+(:code:`\``). Thus it would find :name:`Other Keyword` from the
+earlier example. Note that `libdoc.py`_ also automatically creates
+internal links using the same syntax.

 __ `Documenting libraries`_
+__ `Errors and warnings during execution`_
 __ `User keyword name and documentation`_
 __ `Creating static keywords`_

Reply via email to