Prerequisite for Test Suite

I have one Test Suite folder, in that folder I have 10 Test Cases in separate robot file. I want to execute few steps before starting the execution of these 10 Test Case suite.

Can we do that?

Suite setup & Test setup?
Robotframework Execution flow

1 Like

As I have 10 separate Test Case files with 1 robot file - 1 test case so in which file I should keep Suite Setup keyword?

I’m guessing that TC-1-CAUDS-QCStatus.robot is the first test that runs, so you’d probably want to put it in there, to ensure the Suite Setup runs before any test cases,

If you don’t want to keep the Suite Setupseparate from the test cases for neatness you could create a file like TC-0-CAUDS-SuiteSetup.robotfor that purpose, this is not required but it might work better for you.


1 Like

Thank you for quick response. This seems to also work but I have not tried it but currently I have created one init.robot file in my Test Suite folder and added Suite Setup and Teardown keywords in this file and also added Force Tags (contain tags of my test case files) and it works. Now I can execute single script as well as complete folder of Test Suite.

1 Like