I have a 3 test cases in robot framework and I need to run Teardown actions only Once at last after execution 3 test cases. How to handle?
*** Settings ***
Test Teardown Teardown Actions
Library abc.py
*** Variables ***
*** Test Cases ***
testcase1
Run Keyword func1
testcase2
Run Keyword func2
testcase3
Run Keyword func3
*** Keywords ***
Teardown Actions
Run Keyword clear
There is "Suite Teardown" in robotframework which will run after the execution of all test cases.
Check this link for more info.
Can be use like this.
*** Settings ***
Library SSHLibrary
Library OperatingSystem
Library String
Suite Teardown Teardown Actions
*** Keywords ***
Teardown Actions
Run Keyword clear
*** Testcases ***
testcase1
Run Keyword func1
testcase2
Run Keyword func2
testcase3
Run Keyword func3
Please let me know if more info is required.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With