2 new revisions:

Revision: 3bd391a1a8e2
Branch:   default
Author:   Pekka Klärck
Date:     Mon Dec 23 12:47:26 2013 UTC
Log: TestSuite.run: utest that it is possible to use same file as stdout an...
http://code.google.com/p/robotframework/source/detail?r=3bd391a1a8e2

Revision: 07aba4e2f9e8
Branch:   default
Author:   Pekka Klärck
Date:     Mon Dec 23 12:56:53 2013 UTC
Log:      TestSuite.run: Documented new stdout/stderr passing usage....
http://code.google.com/p/robotframework/source/detail?r=07aba4e2f9e8

==============================================================================
Revision: 3bd391a1a8e2
Branch:   default
Author:   Pekka Klärck
Date:     Mon Dec 23 12:47:26 2013 UTC
Log: TestSuite.run: utest that it is possible to use same file as stdout and stderr.

Update issue 1605
utest that it is possible to use same file as stdout and stderr.
http://code.google.com/p/robotframework/source/detail?r=3bd391a1a8e2

Modified:
 /utest/running/test_running.py

=======================================
--- /utest/running/test_running.py      Fri Dec 20 13:35:36 2013 UTC
+++ /utest/running/test_running.py      Mon Dec 23 12:47:26 2013 UTC
@@ -181,6 +181,12 @@
         self._assert_output(custom_stdout, [('T1', 1)])
         self._assert_output(custom_stderr, [('hello world', 1)])

+    def test_same_custom_stdout_and_stderr(self):
+        custom_output = StringIO()
+        self._run(custom_output, custom_output)
+        self._assert_normal_stdout_stderr_are_empty()
+        self._assert_output(custom_output, [('T1', 1), ('hello world', 1)])
+
     def _run(self, stdout=None, stderr=None):
         suite = TestSuite(name='Suite')
suite.tests.create(name='T1').keywords.create('Log', args=['hello world', 'WARN'])

==============================================================================
Revision: 07aba4e2f9e8
Branch:   default
Author:   Pekka Klärck
Date:     Mon Dec 23 12:56:53 2013 UTC
Log:      TestSuite.run: Documented new stdout/stderr passing usage.

Update issue 1605
Updated API docs.
http://code.google.com/p/robotframework/source/detail?r=07aba4e2f9e8

Modified:
 /src/robot/running/model.py

=======================================
--- /src/robot/running/model.py Fri Dec 20 13:35:36 2013 UTC
+++ /src/robot/running/model.py Mon Dec 23 12:56:53 2013 UTC
@@ -151,23 +151,28 @@
If such an option is used only once, it can be given also as a single
         string like ``variable='VAR:value'``.

+ To capture stdout and/or stderr streams, pass open file objects in as
+        special keyword arguments `stdout` and `stderr`, respectively. Note
+        that this works only in version 2.8.4 and newer.
+
         Only options related to the actual test execution have an effect.
         For example, options related to selecting test cases or creating
         logs and reports are silently ignored. The output XML generated
-        as part of the execution can be configured, though, including
+        as part of the execution can be configured, though. This includes
         disabling it with ``output=None``.

         Example::

+            stdout = StringIO()
             result = suite.run(variable='EXAMPLE:value',
                                critical='regression',
                                output='example.xml',
                                exitonfailure=True,
-                               skipteardownonexit=True)
+                               stdout=stdout)
             print result.return_code

         To save memory, the returned
- :class:`~robot.result.executionresult.Result` object object does not
+        :class:`~robot.result.executionresult.Result` object does not
have any information about the executed keywords. If that information
         is needed, the created output XML file needs to be read  using the
:class:`~robot.result.resultbuilder.ExecutionResult` factory method.
@@ -175,6 +180,9 @@
         See the :mod:`package level <robot.running>` documentation for
more examples, including how to construct executable test suites and
         how to create logs and reports based on the execution results.
+
+ See the :func:`robot.run <robot.run.run>` function for a higher-level
+        API for executing tests in files or directories.
         """
         if not settings:
             settings = RobotSettings(options)

--

--- You received this message because you are subscribed to the Google Groups "robotframework-commit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to robotframework-commit+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to