Revision: 3841
Author: jprantan
Date: Wed Aug 18 04:03:11 2010
Log: Tests for changing teardown to continue execution in case of syntax
error. Issue 615.
http://code.google.com/p/robotframework/source/detail?r=3841
Modified:
/trunk/atest/robot/running/errors_in_test_teardown.txt
/trunk/atest/testdata/running/errors_in_test_teardown.txt
/trunk/utest/running/test_keywords.py
=======================================
--- /trunk/atest/robot/running/errors_in_test_teardown.txt Wed May 5
09:40:19 2010
+++ /trunk/atest/robot/running/errors_in_test_teardown.txt Wed Aug 18
04:03:11 2010
@@ -24,6 +24,10 @@
${tc} = Check Test Case ${TESTNAME}
Should Be True len(${tc.teardown.kws}) == 1
+Syntax Error in Teardown
+ ${tc} = Check Test Case ${TESTNAME}
+ Should Be True len(${tc.teardown.kws}) == 3
+
Fatal Error In Teardown
${tc} = Check Test Case ${TESTNAME}
Should Be True len(${tc.teardown.kws}) == 1
=======================================
--- /trunk/atest/testdata/running/errors_in_test_teardown.txt Wed May 5
09:40:19 2010
+++ /trunk/atest/testdata/running/errors_in_test_teardown.txt Wed Aug 18
04:03:11 2010
@@ -44,6 +44,14 @@
No Operation
[teardown] Timeout
+Syntax Error in Teardown
+ [documentation] FAIL Teardown failed:\nSeveral failures occurred:\n\n
+ ... 1) Non-existing variable '${non existing variable}'.\n\n
+ ... 2) No keyword with name 'Keyword Missing' found.\n\n
+ ... Also teardown of the parent suite failed.
+ No Operation
+ [teardown] Syntax Error
+
Fatal Error In Teardown
[documentation] FAIL Teardown failed:\n
... FatalCatastrophyException\n\n
@@ -71,15 +79,20 @@
\ Fail ${animal}
\ Fail again
-Fatal Error
- Exit On Failure
- Fail This Should Not Be Executed
-
Timeout
[timeout] 42 ms
Sleep 1 s
Fail This Should Not Be Executed
+Syntax Error
+ Log ${non existing variable}
+ Keyword Missing
+ Log This Should Be Executed
+
+Fatal Error
+ Exit On Failure
+ Fail This Should Not Be Executed
+
Suite Teardown With Errors
Fail Suite Message 1
Fail Suite Message 2 (with ∏ön ÄßÇïï €§)
=======================================
--- /trunk/utest/running/test_keywords.py Tue Jun 8 03:52:39 2010
+++ /trunk/utest/running/test_keywords.py Wed Aug 18 04:03:11 2010
@@ -56,6 +56,7 @@
self.output = OutputStub()
self.error = error
self.variables = self.namespace.variables
+ self.teardown = False
self.dry_run = False
def get_handler(self, kwname):