# \_\_init\_\_file and documentation

**URL:** <https://forum.robotframework.org/t/init-file-and-documentation/6682>\
**Category:** Robot Framework\
**Created:** [19 January 2024 10:20 UTC](https://forum.robotframework.org/t/init-file-and-documentation/6682 "2024-01-19T10:20:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrr\_robot](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@mrr\_robot](https://forum.robotframework.org/u/mrr_robot)\
**Post date:** [19 January 2024 10:20 UTC](https://forum.robotframework.org/t/init-file-and-documentation/6682/1 "2024-01-19T10:20:11Z")

</div>

I have this \__init_.robot file and it works fine.

Now I need to add SUT version to report so that it would go to

SUITE Testcases

Documentation:

Can it be added there as I need to retrieve it from DB first?  
What kind of variable / how to use it that it would be there?

Or what would be the best way to have SUT version on log file?

EDIT:

I think this is the way to go:  
Set Suite Documentation ${testRunDetails}

---

<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:** [19 January 2024 10:57 UTC](https://forum.robotframework.org/t/init-file-and-documentation/6682/2 "2024-01-19T10:57:37Z")

</div>

Hi Pete,

I’ll suggest in your ` __init__.robot`

- add a ` ***Variables*** ` section and put a SUT variable in there with a nonsense value e.g. `${SUTName} NotSet`
- create a keyword that retrieves the SUT from the database and then sets the value with [Set Global Variable](https://robotframework.org/robotframework/latest/libraries/BuiltIn.html#Set%20Global%20Variable)
- call this keyword as a Suite Setup

After that you should have it available in all your tests wherever you need it.

Dave.

---

<div class="post-metadata">

**Author:** ![mrr\_robot](https://avatars.discourse-cdn.com/v4/letter/m/bb73d2/32.png) [@mrr\_robot](https://forum.robotframework.org/u/mrr_robot)\
**Post date:** [19 January 2024 11:23 UTC](https://forum.robotframework.org/t/init-file-and-documentation/6682/3 "2024-01-19T11:23:46Z")

</div>

Hi Dave,

thank you for your answer!!
