# Prerequisite for Test Suite

**URL:** <https://forum.robotframework.org/t/prerequisite-for-test-suite/5658>\
**Category:** Robot Framework\
**Created:** [6 May 2023 00:24 UTC](https://forum.robotframework.org/t/prerequisite-for-test-suite/5658 "2023-05-06T00:24:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![automation\_user](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@automation\_user](https://forum.robotframework.org/u/automation_user)\
**Post date:** [6 May 2023 00:24 UTC](https://forum.robotframework.org/t/prerequisite-for-test-suite/5658/1 "2023-05-06T00:24:36Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![\_daryl](https://avatars.discourse-cdn.com/v4/letter/_/45deac/32.png) [@\_daryl](https://forum.robotframework.org/u/_daryl)\
**Post date:** [6 May 2023 15:39 UTC](https://forum.robotframework.org/t/prerequisite-for-test-suite/5658/2 "2023-05-06T15:39:36Z")

</div>

Suite setup & Test setup?  
Robotframework [Execution flow](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#toc-entry-437)

---

<div class="post-metadata">

**Author:** ![automation\_user](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@automation\_user](https://forum.robotframework.org/u/automation_user)\
**Post date:** [10 May 2023 16:14 UTC](https://forum.robotframework.org/t/prerequisite-for-test-suite/5658/3 "2023-05-10T16:14:39Z")

</div>

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?  
 ![image](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/8/818d17687913dde276c1af12ba93cb64a9065430.png)

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [10 May 2023 23:58 UTC](https://forum.robotframework.org/t/prerequisite-for-test-suite/5658/4 "2023-05-10T23:58:57Z")

</div>

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 Setup`separate from the test cases for neatness you could create a file like `TC-0-CAUDS-SuiteSetup.robot`for that purpose, this is not required but it might work better for you.

Dave.

---

<div class="post-metadata">

**Author:** ![automation\_user](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@automation\_user](https://forum.robotframework.org/u/automation_user)\
**Post date:** [11 May 2023 13:43 UTC](https://forum.robotframework.org/t/prerequisite-for-test-suite/5658/5 "2023-05-11T13:43:40Z")

</div>

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.
