Skip to content

Commit

Permalink
fixed RF7 and RobotCode Debugging
Browse files Browse the repository at this point in the history
Signed-off-by: Rene <[email protected]>
  • Loading branch information
Snooz82 committed Feb 13, 2024
1 parent 4c74c16 commit a5df582
Show file tree
Hide file tree
Showing 45 changed files with 535 additions and 454 deletions.
17 changes: 10 additions & 7 deletions atest/TestCases/ConfigKeyword/config_keyword_generate_file.robot
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
*** Settings ***
Library OperatingSystem
Library DataDriver dialect=excel encoding=utf_8 config_keyword=Config
Suite Setup Suite Setup Keyword
Test Template The Test Keyword
Suite Teardown Remove File ${CURDIR}/${random}test321.csv
Library OperatingSystem
Library DataDriver dialect=excel encoding=utf_8 config_keyword=Config

Suite Setup Suite Setup Keyword
Suite Teardown Remove File ${CURDIR}/${random}test321.csv
Test Template The Test Keyword


*** Test Cases ***
Test aaa


*** Keywords ***
Suite Setup Keyword
Log This is the single Suite Setup
Log This is the single Suite Setup

The Test Keyword
[Arguments] ${var}
Expand All @@ -23,4 +26,4 @@ Config
Create File ${CURDIR}/${random}test321.csv
... *** Test Cases ***,\${var},\nTestCase1,111,\nTestCase2,222,
${new_config}= Create Dictionary file=${random}test321.csv
[Return] ${new_config}
RETURN ${new_config}
15 changes: 8 additions & 7 deletions atest/TestCases/ConfigKeyword/custom_reader.robot
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
*** Settings ***
Library Collections
Library DataDriver config_keyword=Config Reader
Test Template check vars
Test Setup Log Hi i am a Setup
Test Teardown Log I am a Teardown
Library Collections
Library DataDriver config_keyword=Config Reader

Test Setup Log Hi i am a Setup
Test Teardown Log I am a Teardown
Test Template check vars


*** Test Cases ***
Expand All @@ -13,11 +14,11 @@ test default 1 2
*** Keywords ***
check vars
[Arguments] ${var_1} ${var_2}
Should Be Equal As Integers ${var_1} ${var_2}
Should Be Equal As Integers ${var_1} ${var_2}
Should Be True ${{isinstance($var1, int)}}
Should Be True ${{isinstance($var2, str)}}

Config Reader
[Arguments] ${config}
${new_config}= Create Dictionary reader_class=TestCases/custom_reader/custom_reader.py min=0 max=8
[Return] ${new_config}
RETURN ${new_config}
22 changes: 11 additions & 11 deletions atest/TestCases/DataTypes/Check_DataTypes.robot
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
*** Settings ***
Library DataDriver encoding=utf8
Test Template Test
Library DataDriver encoding=utf8

Test Template Test


*** Test Cases ***
Template


*** Keywords ***
Test
[Arguments] ${scalar} ${list} ${list_eval} ${dict} ${dict_eval} ${eval} ${exp_eval} ${user}
[Arguments] ${scalar} ${list} ${list_eval} ${dict} ${dict_eval} ${eval} ${exp_eval} ${user}
Run Keyword ${scalar} ${eval} ${exp_eval}
FOR ${item} ${exp} IN ZIP ${list} ${list_eval}
Should Be Equal ${item} ${exp}
FOR ${item} ${exp} IN ZIP ${list} ${list_eval}
Should Be Equal ${item} ${exp}
END
FOR ${Key} IN @{dict_eval}
FOR ${Key} IN @{dict_eval}
Should Be Equal ${dict.${Key}} ${dict_eval}[${Key}]
END
Validate User ${user}



Sum List
[Arguments] ${inputs} ${expected}
${sum}= Set Variable ${0}
Expand All @@ -33,7 +34,6 @@ Whos Your Daddy

Validate User
[Arguments] ${user}
Should Be Equal ${user}[id] ${user}[chk][id]
Should Be Equal ${user.name.first} ${user}[chk][name][first]
Should Be Equal ${user}[id] ${user}[chk][id]
Should Be Equal ${user.name.first} ${user}[chk][name][first]
Should Be Equal ${user}[name][last] ${user}[chk][name][last]

22 changes: 11 additions & 11 deletions atest/TestCases/DataTypes/Check_DataTypes_xlsx.robot
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
*** Settings ***
Library DataDriver file=.xlsx encoding=utf-8
Library Collections
Test Template Test
Library DataDriver file=.xlsx encoding=utf-8
Library Collections

Test Template Test


*** Test Cases ***
Tempalte


*** Keywords ***
Test
[Arguments] ${scalar} ${list} ${list_eval} ${dict} ${dict_eval} ${eval} ${exp_eval} ${user}
[Arguments] ${scalar} ${list} ${list_eval} ${dict} ${dict_eval} ${eval} ${exp_eval} ${user}
Run Keyword ${scalar} ${eval} ${exp_eval}
Lists Should Be Equal ${list} ${list_eval}
FOR ${Key} IN @{dict_eval}
Lists Should Be Equal ${list} ${list_eval}
FOR ${Key} IN @{dict_eval}
Should Be Equal ${dict.${Key}} ${dict_eval}[${Key}]
END
Validate User ${user}



Sum List
[Arguments] ${inputs} ${expected}
${sum}= Set Variable ${0}
Expand All @@ -32,7 +33,6 @@ Whos Your Daddy

Validate User
[Arguments] ${user}
Should Be Equal ${user}[id] ${user}[chk][id]
Should Be Equal ${user.name.first} ${user}[chk][first]
Should Be Equal ${user}[id] ${user}[chk][id]
Should Be Equal ${user.name.first} ${user}[chk][first]
Should Be Equal ${user}[name][last] ${user}[chk][last]

32 changes: 17 additions & 15 deletions atest/TestCases/DataTypes/LiteralEval.robot
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
*** Settings ***
Test Template TestKeyword
Library DataDriver encoding=utf-8
Library DataDriver encoding=utf-8

Test Template TestKeyword


*** Test Cases ***
Template Test


*** Keywords ***
TestKeyword
[Arguments] ${scalar} ${dict} ${list} ${dotdict} ${user}
Log ${scalar}
Log ${dict}
Log ${dict}[name]
Log ${list}
Log ${dotdict.key}
Log ${dotdict}[key2]
Log ${user}
Log ${user}[name][first]
Log ${user.name.last}
Log ${user.nr}
Log ${user.dict}[test]
Log ${user}[pwd]
Log ${scalar}
Log ${dict}
Log ${dict}[name]
Log ${list}
Log ${dotdict.key}
Log ${dotdict}[key2]
Log ${user}
Log ${user}[name][first]
Log ${user.name.last}
Log ${user.nr}
Log ${user.dict}[test]
Log ${user}[pwd]
Log Many ${scalar}
Log Many &{dict}
Log Many @{list}
Log Many &{dotdict}
Log Many &{dotdict}
11 changes: 8 additions & 3 deletions atest/TestCases/DataTypes/Types_in_dicts.robot
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
*** Settings ***
Test Template TestKeyword
Library DataDriver encoding=utf_8
Library DataDriver encoding=utf_8

Test Template TestKeyword

Test Tags rf7only


*** Test Cases ***
Template Test


*** Keywords ***
TestKeyword
[Arguments] ${dict} ${exp}
[Arguments] ${opt}=default ${exp}=Wrong ${dict}=Value
Should Be Equal ${dict} ${exp}
Log To Console \n${dict}
Should Be Equal ${opt} default
28 changes: 15 additions & 13 deletions atest/TestCases/Defaults/CSV/defaults.robot
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
*** Settings ***
Library DataDriver
Test Template Check Variables
Library DataDriver

Test Template Check Variables


*** Variables ***
${Default_Tags}= []

*** Test Cases *** ${var_1} ${var_2} ${var_name} ${var_doc} ${var_tags}
default ${var_1} ${var_2} a a defaults This is the Default Documentation ${Default_Tags}
[Documentation] This is the Default Documentation

*** Test Cases *** ${var_1} ${var_2} ${var_name} ${var_doc} ${var_tags}
default ${var_1} ${var_2} [Documentation] This is the Default Documentation
a a defaults This is the Default Documentation ${Default_Tags}


*** Keywords ***
Check Variables
[Arguments] ${var_1} ${var_2} ${var_name}=None ${var_doc}=None ${var_tags}=None
Verify Variable ${var_1} ${var_2} a
Verify Variable ${TEST_DOCUMENTATION} ${var_doc} This is the Default Documentation
Verify Variable ${TEST_NAME} ${var_name} defaults
Verify Variable ${TEST_TAGS} ${var_tags} ${Default_Tags}

[Arguments] ${var_1} ${var_2} ${var_name}=None ${var_doc}=None ${var_tags}=None
Verify Variable ${var_1} ${var_2} a
Verify Variable ${TEST_DOCUMENTATION} ${var_doc} This is the Default Documentation
Verify Variable ${TEST_NAME} ${var_name} defaults
Verify Variable ${TEST_TAGS} ${var_tags} ${Default_Tags}

Verify Variable
[Arguments] ${var} ${exp_var} ${default}
Run Keyword And Continue On Failure Should Not Be Equal ${var} ${default}
Run Keyword And Continue On Failure Should Be Equal As Strings ${var} ${exp_var}
Run Keyword And Continue On Failure Should Not Be Equal ${var} ${default}
Run Keyword And Continue On Failure Should Be Equal As Strings ${var} ${exp_var}
20 changes: 11 additions & 9 deletions atest/TestCases/Defaults/CSV/generic_csv_reader.robot
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
*** Settings ***
Library DataDriver file=generic_csv_reader.csv reader_class=generic_csv_reader
Test Template Check Variables
Library DataDriver file=generic_csv_reader.csv reader_class=generic_csv_reader

Test Template Check Variables


*** Variables ***
${Default_Tags}= []

*** Test Cases *** ${var_1} ${var_2} ${var_name}
default ${var_1} ${var_2} a a defaults

*** Test Cases *** ${var_1} ${var_2} ${var_name}
default ${var_1} ${var_2} a a defaults


*** Keywords ***
Check Variables
[Arguments] ${var_1} ${var_2} ${var_name}
Verify Variable ${var_1} ${var_2} a
Verify Variable ${TEST_NAME} ${var_name} default a a

Verify Variable ${var_1} ${var_2} a
Verify Variable ${TEST_NAME} ${var_name} default a a

Verify Variable
[Arguments] ${var} ${exp_var} ${default}
Run Keyword And Continue On Failure Should Not Be Equal ${var} ${default}
Run Keyword And Continue On Failure Should Be Equal As Strings ${var} ${exp_var}
Run Keyword And Continue On Failure Should Not Be Equal ${var} ${default}
Run Keyword And Continue On Failure Should Be Equal As Strings ${var} ${exp_var}
25 changes: 13 additions & 12 deletions atest/TestCases/Defaults/CSV/test_case_names.robot
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
*** Settings ***
Library DataDriver
Test Template Check Variables
Library DataDriver

Test Template Check Variables


*** Variables ***
${Default_Tags}= []


*** Test Cases *** ${var_1} ${var_2} ${var_name} ${var_doc} ${var_tags}
default ${var_name_1} ${var_name_2} a a defaults This is the Default Documentation ${Default_Tags}
[Documentation] This is the template Documentation
*** Test Cases *** ${var_1} ${var_2} ${var_name} ${var_doc} ${var_tags}
default ${var_name_1} ${var_name_2} [Documentation] This is the template Documentation
a a defaults This is the Default Documentation ${Default_Tags}


*** Keywords ***
Check Variables
[Arguments] ${var_1} ${var_2} ${var_name} ${var_doc} ${var_tags}
Verify Variable ${var_1} ${var_2} a
Verify Variable ${TEST_DOCUMENTATION} ${var_doc} This is the Default Documentation
Verify Variable ${TEST_NAME} ${var_name} defaults
Verify Variable ${TEST_TAGS} ${var_tags} ${Default_Tags}
[Arguments] ${var_1} ${var_2} ${var_name} ${var_doc} ${var_tags}
Verify Variable ${var_1} ${var_2} a
Verify Variable ${TEST_DOCUMENTATION} ${var_doc} This is the Default Documentation
Verify Variable ${TEST_NAME} ${var_name} defaults
Verify Variable ${TEST_TAGS} ${var_tags} ${Default_Tags}

Verify Variable
[Arguments] ${var} ${exp_var} ${default}
Run Keyword And Continue On Failure Should Not Be Equal ${var} ${default}
Run Keyword And Continue On Failure Should Be Equal As Strings ${var} ${exp_var}
Run Keyword And Continue On Failure Should Not Be Equal ${var} ${default}
Run Keyword And Continue On Failure Should Be Equal As Strings ${var} ${exp_var}
25 changes: 13 additions & 12 deletions atest/TestCases/Defaults/CSV/test_case_no_names.robot
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
*** Settings ***
Library DataDriver
Test Template Check Variables
Library DataDriver

Test Template Check Variables


*** Variables ***
${Default_Tags}= []


*** Test Cases *** ${var_1} ${var_2} ${var_name} ${var_doc} ${var_tags}
default ${var_name_1} ${var_name_2} a a defaults This is the Default Documentation ${Default_Tags}
[Documentation] This is the template Documentation
*** Test Cases *** ${var_1} ${var_2} ${var_name} ${var_doc} ${var_tags}
default ${var_name_1} ${var_name_2} [Documentation] This is the template Documentation
a a defaults This is the Default Documentation ${Default_Tags}


*** Keywords ***
Check Variables
[Arguments] ${var_1} ${var_2} ${var_name} ${var_doc} ${var_tags}
Verify Variable ${var_1} ${var_2} a
Verify Variable ${TEST_DOCUMENTATION} ${var_doc} This is the Default Documentation
Verify Variable ${TEST_NAME} ${var_name} defaults
Verify Variable ${TEST_TAGS} ${var_tags} ${Default_Tags}
[Arguments] ${var_1} ${var_2} ${var_name} ${var_doc} ${var_tags}
Verify Variable ${var_1} ${var_2} a
Verify Variable ${TEST_DOCUMENTATION} ${var_doc} This is the Default Documentation
Verify Variable ${TEST_NAME} ${var_name} defaults
Verify Variable ${TEST_TAGS} ${var_tags} ${Default_Tags}

Verify Variable
[Arguments] ${var} ${exp_var} ${default}
Run Keyword And Continue On Failure Should Not Be Equal ${var} ${default}
Run Keyword And Continue On Failure Should Be Equal As Strings ${var} ${exp_var}
Run Keyword And Continue On Failure Should Not Be Equal ${var} ${default}
Run Keyword And Continue On Failure Should Be Equal As Strings ${var} ${exp_var}
9 changes: 5 additions & 4 deletions atest/TestCases/Defaults/GLOB/defaults_glob_files.robot
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
*** Settings ***
Library DataDriver file=${CURDIR}/DataFiles/*_File.json reader_class=glob_reader
Library OperatingSystem
Test Template Test all Files
Library DataDriver file=${CURDIR}/DataFiles/*_File.json reader_class=glob_reader
Library OperatingSystem

Test Template Test all Files


*** Test Cases ***
Expand All @@ -13,4 +14,4 @@ Test all Files
[Arguments] ${file_name}
${file_content}= Get File ${file_name}
${content}= Evaluate json.loads($file_content)["test_case"]
Should Be Equal ${TEST_NAME} ${content}
Should Be Equal ${TEST_NAME} ${content}
Loading

0 comments on commit a5df582

Please sign in to comment.