Revision: 3855
Author: jprantan
Date: Fri Aug 20 06:01:35 2010
Log: Added new tests for running run keyword variants with dry run. Issue
610.
http://code.google.com/p/robotframework/source/detail?r=3855
Added:
/trunk/atest/testdata/cli/dryrun/run_keyword_variants.txt
/trunk/atest/testdata/cli/dryrun/run_keyword_variants_in_suite_teardown.txt
=======================================
--- /dev/null
+++ /trunk/atest/testdata/cli/dryrun/run_keyword_variants.txt Fri Aug 20
06:01:35 2010
@@ -0,0 +1,85 @@
+*** Variables ***
+${existing} = foo
+${FAILURE MESSAGE WITH LOG KW} = Keyword 'BuiltIn.Log' expected 1 to 2
arguments, got 0.
+
+
+*** Test Cases ***
+Run Keyword With Keyword with Invalid Number of Arguments
+ [Documentation] FAIL ${FAILURE MESSAGE WITH LOG KW}
+ Run Keyword Log
+
+Run Keyword With Missing Keyword
+ [Documentation] FAIL No keyword with name 'Missing' found.
+ Run Keyword Missing
+
+Run Keyword With Variable In Keyword Name
+ Run Keyword Log ${missing}
+ Run Keyword Log ${existing}
+ Run Keyword Log ${EMPTY}
+
+Run Keyword With UK
+ Run Keyword UK
+
+Run Keyword With Failing UK
+ [Documentation] FAIL ${FAILURE MESSAGE WITH LOG KW}
+ Run Keyword Failing UK
+
+Comment
+ Comment Missing Keyword Should Not Fail Even Missing ${variable}
Should Not Fail
+
+Set Variables
+ Set Test Variable ${test}
+ Set Suite Variable ${suite}
+ Set Suite Variable ${global}
+ Set Variable If ${global}
+
+Run Keywords When All Keywords Pass
+ Run Keywords Fail No Operation UK
+
+Run Keywords When One Keyword Fails
+ [Documentation] FAIL ${FAILURE MESSAGE WITH LOG KW}
+ Run Keywords Fail No Operation Log UK
+
+Run Keywords When Multiple Keyword Fails
+ [Documentation] FAIL Several failures occurred:\n\n
+ ... 1) ${FAILURE MESSAGE WITH LOG KW}\n\n
+ ... 2) No keyword with name 'Missing' found.
+ Run Keywords Fail No Operation Log UK Missing
+
+Run Keyword in For Loop Pass
+ :FOR ${i} IN RANGE 5
+ \ Run Keyword No Operation
+
+Run Keyword in For Loop Fail
+ [Documentation] FAIL ${FAILURE MESSAGE WITH LOG KW}
+ :FOR ${i} IN RANGE 5
+ \ Run Keyword Log
+
+Wait Until Keyword Succeeds Pass
+ Wait Until Keyword Succeeds 30 seconds 1 second No Operation
+
+Wait Until Keyword Succeeds Fail
+ [Documentation] FAIL ${FAILURE MESSAGE WITH LOG KW}
+ Wait Until Keyword Succeeds 30 seconds 1 second Log
+
+Run Keyword If Pass
+ Run Keyword If ${TRUE} No Operation
+
+Run Keyword If Fail
+ [Documentation] FAIL ${FAILURE MESSAGE WITH LOG KW}
+ Run Keyword If ${FALSE} Log
+
+Test Teardown Related Run Keyword Variants
+ [Documentation] FAIL Several failures occurred:\n\n
+ ... 1) ${FAILURE MESSAGE WITH LOG KW}\n\n
+ ... 2) ${FAILURE MESSAGE WITH LOG KW}\n\n
+ ... 3) ${FAILURE MESSAGE WITH LOG KW}
+ Run Keyword If Test Failed Log
+ Run Keyword If Test Passed Log
+ Run Keyword If Timeout Occurred Log
+
+
+*** Keywords ***
+UK No Operation
+
+Failing UK Log
=======================================
--- /dev/null
+++
/trunk/atest/testdata/cli/dryrun/run_keyword_variants_in_suite_teardown.txt
Fri Aug 20 06:01:35 2010
@@ -0,0 +1,19 @@
+*** 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.
+ 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