Teardown action in Robot Framework
<p>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?</p>

<pre><code>*** 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
</code></pre>

<p>There is "Suite Teardown" in robotframework which will run after the execution of all test cases.</p>

<p><a href="http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#suite-setup-and-teardown" rel="nofollow">Check this link for more info.</a></p>

<p>Can be use like this.</p>

<pre><code>*** 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
</code></pre>

<p>Please let me know if more info is required.</p>

python python-2.7 robotframework