Revision: 3111
Author: janne.t.harkonen
Date: Mon May  3 00:10:07 2010
Log: More tests for continue on failure
http://code.google.com/p/robotframework/source/detail?r=3111

Modified:
 /trunk/atest/robot/running/continue_on_failure.txt
 /trunk/atest/testdata/running/continue_on_failure.txt

=======================================
--- /trunk/atest/robot/running/continue_on_failure.txt Fri Apr 30 04:09:12 2010 +++ /trunk/atest/robot/running/continue_on_failure.txt Mon May 3 00:10:07 2010
@@ -13,15 +13,33 @@
     ${tc}=  Check Test Case  ${TESTNAME}
Check Log Message ${tc.kws[0].kws[1].msgs[0]} This should be executed in Test Case

+Continue in test with several continuable failures
+    ${tc}=  Check Test Case  ${TESTNAME}
+    Check Log Message  ${tc.kws[1].msgs[0]}  This should be executed
+    Check Log Message  ${tc.kws[3].msgs[0]}  This should also be executed
+ Check Log Message ${tc.kws[5].msgs[0]} This too should also be executed
+
 Continue in user keyword with several continuable failures
     ${tc}=  Check Test Case  ${TESTNAME}
Check Log Message ${tc.kws[0].kws[1].msgs[0]} This should be executed in Test Case Check Log Message ${tc.kws[0].kws[3].msgs[0]} This should also be executed in Test Case Check Log Message ${tc.kws[0].kws[5].msgs[0]} This too should also be executed in Test Case
+
+Continuable and regular failure
+    ${tc}=  Check Test Case  ${TESTNAME}
+    Should Be Equal As Numbers  ${tc.kws.__len__()}  3
+
+Continue in nested user keyword
+    ${tc}=  Check Test Case  ${TESTNAME}
+ Check Log Message ${tc.kws[0].kws[1].msgs[0]} This should be executed in Top Level UK
+
+Continuable and regular failure in nested UK
+    ${tc}=  Check Test Case  ${TESTNAME}

 Continue in test setup
     ${tc}=  Check Test Case  ${TESTNAME}
Check Log Message ${tc.setup.kws[1].msgs[0]} This should be executed in Test Setup
+    Should Be Equal As Numbers  ${tc.kws.__len__()}  0

 Continue in test teardown
     ${tc}=  Check Test Case  ${TESTNAME}
=======================================
--- /trunk/atest/testdata/running/continue_on_failure.txt Fri Apr 30 04:09:12 2010 +++ /trunk/atest/testdata/running/continue_on_failure.txt Mon May 3 00:10:07 2010
@@ -5,7 +5,8 @@

 *** Variables ***
${APOCALYPSE ERROR MESSAGE} ContinuableApocalypseException: Can be continued\n\n -${EXPECTED ERROR MESSAGE} ${APOCALYPSE ERROR MESSAGE}Also teardown of the parent suite failed.
+${TEARDOWN ERROR}  Also teardown of the parent suite failed.
+${EXPECTED ERROR MESSAGE}  ${APOCALYPSE ERROR MESSAGE}${TEARDOWN ERROR}


 *** Test Cases ***
@@ -16,12 +17,37 @@

 Continue in user keyword
     [Documentation]  FAIL  ${EXPECTED ERROR MESSAGE}
-    Continuable Failure In User Keyword In Test Case
+    Continuable Failure In User Keyword In Test Case
+
+Continue in test with several continuable failures
+ [Documentation] FAIL Error 1: ${APOCALYPSE ERROR MESSAGE}Error 2: ${APOCALYPSE ERROR MESSAGE}Error 3: ${EXPECTED ERROR MESSAGE}
+    Raise Continuable Failure
+    Log  This should be executed
+    Raise Continuable Failure
+    Log  This should also be executed
+    Raise Continuable Failure
+    Log  This too should also be executed

 Continue in user keyword with several continuable failures
[Documentation] FAIL Error 1: ${APOCALYPSE ERROR MESSAGE}Error 2: ${APOCALYPSE ERROR MESSAGE}Error 3: ${EXPECTED ERROR MESSAGE}
     Several Continuable Failures In User Keyword In Test Case

+Continuable and regular failure
+ [Documentation] FAIL Error 1: ${APOCALYPSE ERROR MESSAGE}Error 2: Stopping here!!\n\n${TEARDOWN ERROR}
+    Raise Continuable Failure
+    Log  This should be executed
+    Fail  Stopping here!!
+    Log  This should not be executed
+
+Continue in nested user keyword
+ [Documentation] FAIL Error 1: ${APOCALYPSE ERROR MESSAGE}Error 2: ${EXPECTED ERROR MESSAGE}
+    Continuable Failure In Nested UK
+
+Continuable and regular failure in nested UK
+ [Documentation] FAIL Error 1: ${APOCALYPSE ERROR MESSAGE}Error 2: Stop!!\n\n${TEARDOWN ERROR}
+    Continuable and regular failure in nested UK
+    Log  This should not be executed
+
 Continue in test setup
     [Documentation]  FAIL  Setup failed:\n${EXPECTED ERROR MESSAGE}
     [setup]  Continuable Failure In User Keyword In Test Setup
@@ -46,3 +72,16 @@
     Raise Continuable Failure
     Log  This too should also be executed in ${where}

+Continuable Failure In Nested UK
+    Continuable Failure In User Keyword In Nested UK
+    Log  This should be executed in Top Level UK
+    Raise Continuable Failure
+
+Continuable and regular failure in nested UK
+    Continuable and regular failure
+    Log  This should not be executed
+
+Continuable and regular failure
+    Raise Continuable Failure
+    Log  This should be executed in Nested UK
+    Fail  Stop!!

Reply via email to