2 new revisions:
Revision: c401236a73b5
Branch: default
Author: Pekka Klärck
Date: Thu Feb 13 06:01:15 2014 UTC
Log: runner: cleanup to ease fixing bug w/ PassExecution in suite
teardown
http://code.google.com/p/robotframework/source/detail?r=c401236a73b5
Revision: 874a1e732c8b
Branch: default
Author: Pekka Klärck
Date: Thu Feb 13 06:12:20 2014 UTC
Log: Fixed handling PassExecution in suite teardown...
http://code.google.com/p/robotframework/source/detail?r=874a1e732c8b
==============================================================================
Revision: c401236a73b5
Branch: default
Author: Pekka Klärck
Date: Thu Feb 13 06:01:15 2014 UTC
Log: runner: cleanup to ease fixing bug w/ PassExecution in suite
teardown
http://code.google.com/p/robotframework/source/detail?r=c401236a73b5
Modified:
/src/robot/running/runner.py
=======================================
--- /src/robot/running/runner.py Thu Jan 23 14:00:53 2014 UTC
+++ /src/robot/running/runner.py Thu Feb 13 06:01:15 2014 UTC
@@ -160,20 +160,19 @@
def _run_setup(self, setup, status, result=None):
if not status.failures:
- failure = self._run_setup_or_teardown(setup, 'setup')
- status.setup_executed(failure)
- if result and isinstance(failure, PassExecution):
- result.message = failure.message
+ exception = self._run_setup_or_teardown(setup, 'setup')
+ status.setup_executed(exception)
+ if result and isinstance(exception, PassExecution):
+ result.message = exception.message
def _run_teardown(self, teardown, status, result=None):
if status.teardown_allowed:
- failure = self._run_setup_or_teardown(teardown, 'teardown')
- status.teardown_executed(failure)
- if result and failure:
- result.message = status.message
- if result and isinstance(failure, PassExecution):
- result.message = failure.message
- return failure
+ exception = self._run_setup_or_teardown(teardown, 'teardown')
+ status.teardown_executed(exception)
+ failed = not isinstance(exception, PassExecution)
+ if result and exception:
+ result.message = status.message if failed else
exception.message
+ return exception
def _run_setup_or_teardown(self, data, kw_type):
if not data:
==============================================================================
Revision: 874a1e732c8b
Branch: default
Author: Pekka Klärck
Date: Thu Feb 13 06:12:20 2014 UTC
Log: Fixed handling PassExecution in suite teardown
Update issue 1656
Status: Done
Owner: pekka.klarck
The problem was that PassExecution exception was not handled correctly in
suite teardowns. Status written to the XML output was correct, and thus
logs/reports generated based on them were correct too. Statistics collected
at runtime and shown on console were wrong. You would also see the problem
if you executed tests programmatically. The received Result object could
contain incorrect test statuses.
Pass Execution was already tested in suite teardown but this bug slipped
through because the tests only verified statuses based on the XML output.
Added test to verify statitics on the console too.
http://code.google.com/p/robotframework/source/detail?r=874a1e732c8b
Modified:
/atest/robot/running/pass_execution.txt
/src/robot/running/runner.py
=======================================
--- /atest/robot/running/pass_execution.txt Thu Nov 14 13:48:37 2013 UTC
+++ /atest/robot/running/pass_execution.txt Thu Feb 13 06:12:20 2014 UTC
@@ -145,6 +145,11 @@
With continuable failure in keyword teardown
Check Test Case ${TESTNAME}
+
+Statuses should be correct when running tests
+ Check Stdout Contains SEPARATOR=\n
+ ... 35 critical tests, 18 passed, 17 failed
+ ... 35 tests total, 18 passed, 17 failed
Passes suite setup and teardown and can modify tags in former
Run Tests ${EMPTY}
running/pass_execution_in_suite_setup_and_teardown.txt
=======================================
--- /src/robot/running/runner.py Thu Feb 13 06:01:15 2014 UTC
+++ /src/robot/running/runner.py Thu Feb 13 06:12:20 2014 UTC
@@ -172,7 +172,7 @@
failed = not isinstance(exception, PassExecution)
if result and exception:
result.message = status.message if failed else
exception.message
- return exception
+ return exception if failed else None
def _run_setup_or_teardown(self, data, kw_type):
if not data:
--
---
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.