You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Run Keywords: Execution is not continued in teardown if keyword name contains non-existing variable #4453
When I have 2 keywords: the first one is embedded keyword, the second one is either embedded or normal keyword. I use these 2 keywords within [Teardown] and with using Run Keywords keyword. If the first keyword fails because it could not find embedded argument, it fails and does not continue to execute the second keyword.
For example:
*** Test Cases ***
TC teardown fail
${var} Set Variable 1
[Teardown] Run Keywords Embbedded Kw ${b}
... AND Log ${var}
*** Keywords ***
Embbedded Kw ${x}
Log ${x}
The result: Embbedded Kw ${x} fails because arg ${b} is not found. But it does not continue to execute Log ${var}.
As stated in documentation that Teardown has ability to continue on failure. So, I think that in case of embedded keyword it should continue to execute event it could not find the embedded argument.
As I have been in this community for a while, I could implement this one if it's not too complex.
changed the title [-]In Tearddown, using embedded keywords in Run Keywords does not continue another keyword when the first keyword fails[/-][+]In Teardown, using embedded keywords in Run Keywords does not continue another keyword when the first keyword fails[/+]on Sep 7, 2022
I can reproduce the problem, but the problem isn't actually with embedded arguments but with Run Keywords. The same problem occurs if you use Run Keywords in teardown so that the keyword name is a variable. For example, here the second keyword isn't run:
*** Test Cases ***Example
No Operation
[Teardown] Run Keywords ${bad} AND Fail
Embedded arguments work fine in teardowns if you use them inside a normal keyword like here:
*** Test Cases ***Example
No Operation
[Teardown] Keyword
*** Keywords ***Keyword
Embbedded Kw ${bad}
Fail This is run
The problem with Run Keywords is pretty easy to fix. The fix also gives be an idea how we possibly could fix #1595 that affects embedded args when used with Run Keywords or other keywords running keywords internally.
changed the title [-]In Teardown, using embedded keywords in Run Keywords does not continue another keyword when the first keyword fails[/-][+]`Run Keywords`: Execution is not continued in teardown if keyword name contains non-existing [/+]on Sep 8, 2022
changed the title [-]`Run Keywords`: Execution is not continued in teardown if keyword name contains non-existing [/-][+]`Run Keywords`: Execution is not continued in teardown if keyword name contains non-existing variable[/+]on Sep 9, 2022
Activity
[-]In Tearddown, using embedded keywords in Run Keywords does not continue another keyword when the first keyword fails[/-][+]In Teardown, using embedded keywords in Run Keywords does not continue another keyword when the first keyword fails[/+]pekkaklarck commentedon Sep 8, 2022
I can reproduce the problem, but the problem isn't actually with embedded arguments but with
Run Keywords. The same problem occurs if you useRun Keywordsin teardown so that the keyword name is a variable. For example, here the second keyword isn't run:Embedded arguments work fine in teardowns if you use them inside a normal keyword like here:
The problem with
Run Keywordsis pretty easy to fix. The fix also gives be an idea how we possibly could fix #1595 that affects embedded args when used withRun Keywordsor other keywords running keywords internally.[-]In Teardown, using embedded keywords in Run Keywords does not continue another keyword when the first keyword fails[/-][+]`Run Keywords`: Execution is not continued in teardown if keyword name contains non-existing [/+][-]`Run Keywords`: Execution is not continued in teardown if keyword name contains non-existing [/-][+]`Run Keywords`: Execution is not continued in teardown if keyword name contains non-existing variable[/+]