Is there an elegant way to handle suite-level preparation dependencies in Robot Framework?

Hi all,
I’m working on a Robot Framework project with a structure like this:

1.7.1 Suite 1

├─ 1.7.1.1 Prepare

├─ 1.7.1.2 Test

└─ 1.7.1.4 Clean up

1.7.2 Suite 2

├─ 1.7.2.1 Prepare

├─ 1.7.2.2 Test 2

└─ 1.7.2.3 Clean_Up

Each suite has its own Prepare sub-suite that sets up infrastructure before running tests. Currently, I use:

Depends on suite 01 Prepare

to enforce this dependency. The issue is that many suites share the same name (01 Prepare), which leads to ambiguous behavior and makes the setup fragile—especially when renaming or reorganizing folders.

Question:
Is there an elegant, recommended way to achieve this in Robot Framework? Ideally:

  • Avoid ambiguity when multiple suites have the same preparation name.

  • Make the solution resilient to renames and folder changes.

  • Keep the setup logic clean and maintainable for large projects.

Any advice or examples from your experience would be greatly appreciated!

Hi,

I would suggest you reading about Suite initialization files in official robot framework user guide.

FYI - Here’s a link to the Suite initialization files that @vadurk mentioned.

1 Like