Search code examples
python-3.xpython-2.7robotframeworkrobotframework-iderobotframework-sshlibrary

How to pass the result of one test case to another test case in Robot Framework


I am running multiple test case in robot framework.

I wish to pass the result of one test case to another test case. Is there any way to do the same.

Example

TC01-Search and Navigate to Required Vessel

Given Home Page is Loaded
When Search Ship and Choose Required Vessel
${name}   ${no}  Navigate to the Vessel View 

TC02-Verify Vessel Details in Case

Given Cases is Available in Apps And I Navigate to Cases Then Verify Vessel Details are present or not ${name} ${no}

Here I have to pass ${name} and ${no} from TC-01 to TC-02. Is there anyway to do this?


Solution

  • You can use the below keyword

    Set Suite Variable name, *values
    Makes a variable available everywhere within the scope of the current suite.

    The above keyword can be used to reuse the test data in different test cases