# BeforeSuites and AfterSuites

**URL:** <https://forum.robotframework.org/t/beforesuites-and-aftersuites/6525>\
**Category:** Robot Framework\
**Created:** [30 November 2023 10:22 UTC](https://forum.robotframework.org/t/beforesuites-and-aftersuites/6525 "2023-11-30T10:22:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Java263](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@Java263](https://forum.robotframework.org/u/Java263)\
**Post date:** [30 November 2023 10:22 UTC](https://forum.robotframework.org/t/beforesuites-and-aftersuites/6525/1 "2023-11-30T10:22:21Z")

</div>

Hello all,  
I have multiple test suites files.  
Is there any way to invoke a method before any testuite starts (Call only 1 time) and a method after all test suites done (call only 1 time).  
Like: I want to print message “Test suite start” to inform that test case start running. and I want to print message “Test run complete”.  
Thanks for advices.

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [30 November 2023 10:55 UTC](https://forum.robotframework.org/t/beforesuites-and-aftersuites/6525/2 "2023-11-30T10:55:00Z")

</div>

Those are exactly the settings `Suite Setup` and `Suite Teardown`.  
You can have then in a **\*\*\* Settings \*\*\*** section, for a multiple test cases .robot file, or in a **\_\_init\_\_.robot** file in the root of the test suite directory.

[RIDE](https://github.com/robotframework/RIDE) makes this management easy.

---

<div class="post-metadata">

**Author:** ![Java263](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@Java263](https://forum.robotframework.org/u/Java263)\
**Post date:** [1 December 2023 03:44 UTC](https://forum.robotframework.org/t/beforesuites-and-aftersuites/6525/3 "2023-12-01T03:44:55Z")

</div>

does it means: I have to put Suite Setup and Suite Teardown in everyeach of testsuite file.  
so If i have 10 testsuite file, i have to put 10 times.  
But I only want to run only 1 time before any test suite run to notify “Test case start running”.  
And only 1 time run after all test suite finished , “All test complete”.  
I check in the listener file and to be able to run only 1 time before any test suite run, i can put the code in the **init** method. But how about run only 1 time after all test suites complete.? where i can put the code.? many thanks.

---

<div class="post-metadata">

**Author:** ![JaPyR](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/japyr/32/756_2.png) [@JaPyR](https://forum.robotframework.org/u/JaPyR)\
**Post date:** [1 December 2023 09:07 UTC](https://forum.robotframework.org/t/beforesuites-and-aftersuites/6525/4 "2023-12-01T09:07:06Z")

</div>

From robotframework perspective single `.robot` file could be a suite with own suite setup and teardown. Also whole directory could be suite of suites and this top suite could have own setup and teardown which should be specified in ` __init__.robot`. Documentation for suite initialization could be found [here](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#suite-initialization-files).

---

<div class="post-metadata">

**Author:** ![Java263](https://avatars.discourse-cdn.com/v4/letter/j/ee59a6/32.png) [@Java263](https://forum.robotframework.org/u/Java263)\
**Post date:** [1 December 2023 09:19 UTC](https://forum.robotframework.org/t/beforesuites-and-aftersuites/6525/5 "2023-12-01T09:19:15Z")

</div>

oh, i got it. thanks
