Revision: 0b7f266dea6e
Branch: default
Author: Pekka Klärck
Date: Sat Jan 5 11:36:48 2013
Log: Fixed tests after changing message when suite teardown fails.
Update issue 1307
Ooops, forgot that changing suite teardown error message breaks quite many
unrelated tests. Hopefully all fixed now.
http://code.google.com/p/robotframework/source/detail?r=0b7f266dea6e
Modified:
/atest/testdata/cli/dryrun/run_keyword_variants_in_suite_teardown.txt
/atest/testdata/core/unicode_failure_in_suite_setup_and_teardown.txt
/atest/testdata/running/continue_on_failure.txt
/atest/testdata/running/errors_in_test_teardown.txt
/atest/testdata/running/prevent_recursion.txt
/atest/testdata/standard_libraries/builtin/fatal_error.txt
/atest/testdata/standard_libraries/builtin/run_keyword_if_test_passed_failed/run_keyword_if_test_failed_in_suite_fixtures.txt
/atest/testdata/standard_libraries/builtin/run_keyword_if_test_passed_failed/run_keyword_if_test_passed_failed.txt
/atest/testdata/standard_libraries/builtin/run_keyword_if_test_passed_failed/run_keyword_if_test_passed_in_suite_fixtures.txt
/atest/testdata/standard_libraries/builtin/run_keywords.txt
/atest/testdata/standard_libraries/builtin/tags/sub2.txt
=======================================
--- /atest/testdata/cli/dryrun/run_keyword_variants_in_suite_teardown.txt
Fri Aug 20 06:01:35 2010
+++ /atest/testdata/cli/dryrun/run_keyword_variants_in_suite_teardown.txt
Sat Jan 5 11:36:48 2013
@@ -1,19 +1,24 @@
*** Settings ***
Suite Teardown Run All Suite Teardown Related Run Keyword Variants
-
-*** Variables ***
-${FAILURE MESSAGE WITH LOG KW} = Keyword 'BuiltIn.Log' expected 1 to 2
arguments, got 0.
-
-
*** Test Cases ***
Suite Teardown Related Run Keyword Variants
- [Documentation] FAIL Teardown of the parent suite failed.
+ [Documentation] FAIL
+ ... Teardown of the parent suite failed:
+ ... Several failures occurred:
+ ...
+ ... 1) Keyword 'BuiltIn.Log' expected 1 to 2 arguments, got 0.
+ ...
+ ... 2) No keyword with name 'Non Existing' found.
+ ...
+ ... 3) Keyword 'BuiltIn.Log' expected 1 to 2 arguments, got 3.
+ ...
+ ... 4) Keyword 'BuiltIn.Log' expected 1 to 2 arguments, got 0.
No Operation
*** Keywords ***
Run All Suite Teardown Related Run Keyword Variants
- Run Keyword If All Critical Tests Passed Log
- Run Keyword If Any Critical Tests Failed Log
- Run Keyword If All Tests Passed Log
- Run Keyword If Any Tests Failed Log
+ Run Keyword If All Critical Tests Passed Log
+ Run Keyword If Any Critical Tests Failed Non Existing
+ Run Keyword If All Tests Passed Log too many args
+ Run Keyword If Any Tests Failed Log
=======================================
--- /atest/testdata/core/unicode_failure_in_suite_setup_and_teardown.txt
Thu Jan 3 05:27:28 2013
+++ /atest/testdata/core/unicode_failure_in_suite_setup_and_teardown.txt
Sat Jan 5 11:36:48 2013
@@ -8,5 +8,6 @@
[Documentation] FAIL Setup of the parent suite failed:
... Circle is 360°, Hyvää üötä, উৄ ৰ ৺ ট ৫ ৪ হ
...
- ... Also teardown of the parent suite failed.
+ ... Also teardown of the parent suite failed:
+ ... Circle is 360°, Hyvää üötä, উৄ ৰ ৺ ট ৫ ৪ হ
=======================================
--- /atest/testdata/running/continue_on_failure.txt Fri Nov 30 06:40:40 2012
+++ /atest/testdata/running/continue_on_failure.txt Sat Jan 5 11:36:48 2013
@@ -7,7 +7,7 @@
${HEADER} Several failures occurred:
${EXC} ContinuableApocalypseException
${ERROR} ${EXC}: Can be continued
-${TEARDOWN ERROR} Also teardown of the parent suite failed.
+${TEARDOWN ERROR} Also teardown of the parent suite
failed:\nContinuableApocalypseException: Can be continued
${ERROR WITH TEARDOWN} ${ERROR}\n\n${TEARDOWN ERROR}
=======================================
--- /atest/testdata/running/errors_in_test_teardown.txt Wed Aug 18 05:05:17
2010
+++ /atest/testdata/running/errors_in_test_teardown.txt Sat Jan 5 11:36:48
2013
@@ -1,12 +1,13 @@
*** Settings ***
-Library Exceptions
-Suite Teardown Suite Teardown With Errors
+Library Exceptions
+Suite Setup Set Suite Teardown Failed Variable
+Suite Teardown Suite Teardown With Errors
*** Test Cases ***
One Error In Teardown
[documentation] FAIL Teardown failed:\n
... Message\n\n
- ... Also teardown of the parent suite failed.
+ ... ${SUITE TEARDOWN FAILED}
No Operation
[teardown] One Error
@@ -15,14 +16,14 @@
... Several failures occurred:\n\n
... 1) Message 1\n\n
... 2) Message 2\n\n
- ... Also teardown of the parent suite failed.
+ ... ${SUITE TEARDOWN FAILED}
No Operation
[teardown] Many Errors
Errors In Teardown When Setting Variables
[documentation] FAIL Teardown failed:\n
... no return value is set\n\n
- ... Also teardown of the parent suite failed.
+ ... ${SUITE TEARDOWN FAILED}
No Operation
[teardown] Errors when setting variables
@@ -33,14 +34,14 @@
... 2) again\n\n
... 3) dog\n\n
... 4) again\n\n
- ... Also teardown of the parent suite failed.
+ ... ${SUITE TEARDOWN FAILED}
No Operation
[teardown] Errors In For Loop
Keyword Timeout In Teardown
[documentation] FAIL Teardown failed:\n
... Keyword timeout 42 milliseconds exceeded.\n\n
- ... Also teardown of the parent suite failed.
+ ... ${SUITE TEARDOWN FAILED}
No Operation
[teardown] Timeout
@@ -48,7 +49,7 @@
[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.
+ ... ${SUITE TEARDOWN FAILED}
No Operation
[teardown] Syntax Error
@@ -58,19 +59,37 @@
... 2) This should be executed\n\n
... 3) Non-existing variable '${non existing variable}'.\n\n
... 4) This should be executed\n\n
- ... Also teardown of the parent suite failed.
+ ... ${SUITE TEARDOWN FAILED}
No Operation
[teardown] Syntax Errors In For Loop
Fatal Error In Teardown
[documentation] FAIL Teardown failed:\n
... FatalCatastrophyException\n\n
- ... Also teardown of the parent suite failed.
+ ... ${SUITE TEARDOWN FAILED}
No Operation
[teardown] Fatal Error
*** Keywords ***
+Set Suite Teardown Failed Variable
+ ${SUITE TEARDOWN FAILED} = Catenate SEPARATOR=\n
+ ... Also teardown of the parent suite failed:
+ ... Several failures occurred:
+ ... ${EMPTY}
+ ... 1) Suite Message 1
+ ... ${EMPTY}
+ ... 2) Suite Message 2 (with ∏ön ÄßÇïï €§)
+ ... ${EMPTY}
+ ... 3) No keyword with name 'Missing Keyword' found.
+ Set Suite Variable ${SUITE TEARDOWN FAILED}
+
+Suite Teardown With Errors
+ Fail Suite Message 1
+ Fail Suite Message 2 (with ∏ön ÄßÇïï €§)
+ Missing Keyword
+ Log This As Well Should Be Executed
+
One Error
Fail Message
Log This Should Be executed
@@ -103,14 +122,8 @@
:FOR ${i} IN RANGE 2
\ Log ${non existing variable}
\ Fail This should be executed
- Log This should be executed
+ 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 ÄßÇïï €§)
- Missing Keyword
- Log This As Well Should Be Executed
=======================================
--- /atest/testdata/running/prevent_recursion.txt Wed Jan 2 00:32:52 2013
+++ /atest/testdata/running/prevent_recursion.txt Sat Jan 5 11:36:48 2013
@@ -2,7 +2,7 @@
Suite Teardown Recursion With Run Keyword
*** Variables ***
-${PTD FAILED} \n\nAlso teardown of the parent suite failed.
+${PTD FAILED} \n\nAlso teardown of the parent suite
failed:\nMaximum limit of started keywords exceeded.
${LIMIT EXCEEDED} Maximum limit of started keywords exceeded.${PTD
FAILED}
=======================================
--- /atest/testdata/standard_libraries/builtin/fatal_error.txt Thu May 6
02:04:00 2010
+++ /atest/testdata/standard_libraries/builtin/fatal_error.txt Sat Jan 5
11:36:48 2013
@@ -4,12 +4,18 @@
***Test Cases***
Test is stopped when `Fatal Error` keyword is used
- [Documentation] FAIL Faster, Pussycat! Kill! Kill!\n\n
- ... Also teardown of the parent suite failed.
+ [Documentation] FAIL
+ ... Faster, Pussycat! Kill! Kill!
+ ...
+ ... Also teardown of the parent suite failed:
+ ... AssertionError
Fatal Error Faster, Pussycat! Kill! Kill!
Fail This isn't executed anymore
Subsequent tests are not executed after `Fatal Error` keyword has been used
- [Documentation] FAIL Test execution is stopped due to a fatal
error\n\n
- ... Also teardown of the parent suite failed.
+ [Documentation] FAIL
+ ... Test execution is stopped due to a fatal error
+ ...
+ ... Also teardown of the parent suite failed:
+ ... AssertionError
Fail This isn't executed anymore
=======================================
---
/atest/testdata/standard_libraries/builtin/run_keyword_if_test_passed_failed/run_keyword_if_test_failed_in_suite_fixtures.txt
Thu Jan 3 05:27:28 2013
+++
/atest/testdata/standard_libraries/builtin/run_keyword_if_test_passed_failed/run_keyword_if_test_failed_in_suite_fixtures.txt
Sat Jan 5 11:36:48 2013
@@ -1,6 +1,6 @@
*** Setting ***
-Suite Setup Run Keyword If Test Failed Log ${NON EXISTING}
#Should not be executed nor evaluated
-Suite Teardown Run Keyword If Test Failed Log ${NON EXISTING}
#Should not be executed nor evaluated
+Suite Setup Run Keyword If Test Failed Fail ${NON EXISTING}
+Suite Teardown Run Keyword If Test Failed Fail ${NON EXISTING}
*** Test Case ***
@@ -8,5 +8,6 @@
[Documentation] FAIL Setup of the parent suite failed:
... Keyword 'Run Keyword If Test Failed' can only be used in test
teardown
...
- ... Also teardown of the parent suite failed.
+ ... Also teardown of the parent suite failed:
+ ... Keyword 'Run Keyword If Test Failed' can only be used in test
teardown
No Operation
=======================================
---
/atest/testdata/standard_libraries/builtin/run_keyword_if_test_passed_failed/run_keyword_if_test_passed_failed.txt
Thu Jan 3 05:27:28 2013
+++
/atest/testdata/standard_libraries/builtin/run_keyword_if_test_passed_failed/run_keyword_if_test_passed_failed.txt
Sat Jan 5 11:36:48 2013
@@ -1,5 +1,3 @@
-*** Setting ***
-
*** Variable ***
${EXPECTED FAILURE} Expected failure
${TEARDOWN MESSAGE} Teardown message
@@ -11,18 +9,18 @@
[Teardown] Run Keyword If Test Failed Log Hello from teardown!
Run Keyword If test Failed When Test Does Not Fail
- Noop
- [Teardown] Run Keyword If Test Failed Log ${MESSAGE}
#Should not be executed nor evaluated
+ No Operation
+ [Teardown] Run Keyword If Test Failed Fail ${NOT EXECUTED}
Run Keyword If Test Failed Can't Be Used In Setup
[Documentation] FAIL Setup failed:
... Keyword 'Run Keyword If Test Failed' can only be used in test
teardown
- [Setup] Run Keyword If Test Failed Fail ${MESSAGE} #Should
not be executed nor evaluated
- Noop
+ [Setup] Run Keyword If Test Failed Fail ${NOT EXECUTED}
+ No Operation
Run Keyword If Test Failed Can't Be Used in Test
[Documentation] FAIL Keyword 'Run Keyword If Test Failed' can only
be used in test teardown
- Run Keyword If Test Failed Log ${MESSAGE} #Should not be
executed nor evaluated
+ Run Keyword If Test Failed Fail ${NOT EXECUTED}
Run Keyword If Test Failed Uses User Keyword
[Documentation] FAIL Expected failure
@@ -38,7 +36,7 @@
[Teardown] Run Keyword If Test Failed Fail Expected teardown
failure
Run Keyword If Test Passed When Test Passes
- Noop
+ No Operation
[Teardown] Run Keyword If Test Passed Log Teardown of passing
test
Run Keyword If Test Passed When Test Fails
@@ -49,21 +47,21 @@
Run Keyword If Test Passed Can't Be used In Setup
[Documentation] FAIL Setup failed:
... Keyword 'Run Keyword If Test Passed' can only be used in test
teardown
- [Setup] Run Keyword If Test Passed Fail ${MESSAGE} #Should
not be executed nor evaluated
- Noop
+ [Setup] Run Keyword If Test Passed Fail ${NOT EXECUTED}
+ No Operation
Run Keyword If Test Passed Can't Be used In Test
[Documentation] FAIL Keyword 'Run Keyword If Test Passed' can only
be used in test teardown
- Run Keyword If Test Passed Fail ${MESSAGE} #Should not be
executed nor evaluated
+ Run Keyword If Test Passed Fail ${NOT EXECUTED}
Run Keyword If Test Passes Uses User Keyword
- Noop
+ No Operation
[Teardown] Run Keyword If Test Passed Teardown UK ${TEARDOWN
MESSAGE}
Run Keyword If Test Passed Fails
[Documentation] FAIL Teardown failed:
... Expected failure
- Noop
+ No Operation
[Teardown] Run Keyword If Test Passed Fail ${EXPECTED FAILURE}
*** Keyword ***
=======================================
---
/atest/testdata/standard_libraries/builtin/run_keyword_if_test_passed_failed/run_keyword_if_test_passed_in_suite_fixtures.txt
Thu Jan 3 05:27:28 2013
+++
/atest/testdata/standard_libraries/builtin/run_keyword_if_test_passed_failed/run_keyword_if_test_passed_in_suite_fixtures.txt
Sat Jan 5 11:36:48 2013
@@ -1,6 +1,6 @@
*** Setting ***
-Suite Setup Run Keyword If Test Passed Log ${NON EXISTING}
#Should not be executed nor evaluated
-Suite Teardown Run Keyword If Test Passed Log ${NON EXISTING}
#Should not be executed nor evaluated
+Suite Setup Run Keyword If Test Passed Fail ${NON EXISTING}
+Suite Teardown Run Keyword If Test Passed Fail ${NON EXISTING}
*** Test Case ***
@@ -8,5 +8,6 @@
[Documentation] FAIL Setup of the parent suite failed:
... Keyword 'Run Keyword If Test Passed' can only be used in test
teardown
...
- ... Also teardown of the parent suite failed.
+ ... Also teardown of the parent suite failed:
+ ... Keyword 'Run Keyword If Test Passed' can only be used in test
teardown
No Operation
=======================================
--- /atest/testdata/standard_libraries/builtin/run_keywords.txt Tue Oct 26
08:34:23 2010
+++ /atest/testdata/standard_libraries/builtin/run_keywords.txt Sat Jan 5
11:36:48 2013
@@ -8,8 +8,10 @@
${PASSING} Passing
${FAILING} Failing
@{KEYWORDS} ${NOOP} ${PASSING} Log Variables
-${TD ERR} Teardown of the parent suite failed.
-${ATD ERR} \n\nAlso teardown of the parent suite failed.
+${ERRORS} Several failures occurred:\n\n1) Expected error message\n\n2)
AssertionError
+${TD ERR} Teardown of the parent suite failed:\n${ERRORS}
+${ATD ERR} \n\nAlso teardown of the parent suite failed:\n${ERRORS}
+
***Test Cases***
=======================================
--- /atest/testdata/standard_libraries/builtin/tags/sub2.txt Fri Aug 31
00:15:08 2012
+++ /atest/testdata/standard_libraries/builtin/tags/sub2.txt Sat Jan 5
11:36:48 2013
@@ -3,7 +3,7 @@
Library Collections
*** Variable ***
-${ERROR} FAIL Teardown of the parent suite failed.
+${ERROR} FAIL Teardown of the parent suite failed:\n'Set Tags'
and 'Remove Tags' keywords cannot be used in suite teardown.
*** Test Case ***
Set Tags In Test Setup