Skip to content

Commit

Permalink
Add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HardNorth committed Jan 9, 2025
1 parent f920127 commit 3719ed9
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
19 changes: 19 additions & 0 deletions examples/rkie_keyword_error.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
*** Settings ***
Documentation Example of 'Run Keyword And Ignore Error' keyword reporting
*** Variables ***
${countval} 0

*** Test Cases ***
Rkie test
Run Keyword And Ignore Error Fail on first try
Fail on first try

*** Keywords ***
Fail on first try
${counter} Evaluate ${countval} + 1
Set Suite Variable ${countval} ${counter}
IF ${countval} < 2
Log To less executions error ERROR
Fail To less executions
END
36 changes: 36 additions & 0 deletions tests/integration/test_remove_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,15 @@ def test_remove_keyword_not_provided(mock_client_init):
0,
"Content removed using the --remove-keywords option.",
),
(
"examples/binary_file_log_as_image.robot",
"tag:bin*",
0,
["PASSED"] * 3,
1,
0,
"Content removed using the --remove-keywords option.",
),
(
"examples/binary_file_log_as_text.robot",
"tag:binary",
Expand All @@ -266,6 +275,33 @@ def test_remove_keyword_not_provided(mock_client_init):
2,
'Binary data of type "image/jpeg" logging skipped, as it was processed as text and hence corrupted.',
),
(
"examples/rkie_keyword.robot",
"name: BuiltIn.Run Keyword And Ignore Error",
0,
["PASSED"] * 3 + ["SKIPPED"] * 2 + ["PASSED"] * 3,
3,
0,
"Content removed using the --remove-keywords option.",
),
(
"examples/rkie_keyword.robot",
"name: *.Run Keyword And Ignore Error",
0,
["PASSED"] * 3 + ["SKIPPED"] * 2 + ["PASSED"] * 3,
3,
0,
"Content removed using the --remove-keywords option.",
),
(
"examples/rkie_keyword_error.robot",
"name: BuiltIn.Run Keyword And Ignore Error",
0,
["PASSED"] * 3 + ["FAILED"] * 3 + ["PASSED"] * 3 + ["SKIPPED"] * 3 + ["PASSED"] * 3,
6,
2,
"To less executions error",
),
],
)
@mock.patch(REPORT_PORTAL_SERVICE)
Expand Down

0 comments on commit 3719ed9

Please sign in to comment.