robotcode
robotcode copied to clipboard
[ENHANCEMENT] Activate other profiles
Hello,
I'd like to be able to activate other profiles when selecting one. Note that this is different from the inherit
For instance let say I have the following profiles:
- server_UAT
- server_PREPROD
- dryrun
- ci
Both server_* profiles are setting some variables required for my tests to run (like URL and stuff)
Dryrun is to run tests in dryrun mode, but it still requires some var to avoid undefined variable errors (vars that can be set from above profiles)
And ci is enabled if in ci.
I would like something like:
[profiles.dryrun]
activate_profiles = ["server_UAT", "ci"]
Then in my pipeline I would call my job simply with robotcode -p dryrun robot
Why does inherit not work? For instance ci profile is only enabled in ci environment:
[profiles.ci]
enabled = { if = "environ.get('CI') == 'true'" }
With inherit my dryrun profile would also inherit that enable parameter. Here I want that the dryrun profile to be enabled no matter what, but not the ci
Recap
Command robotcode -p dryrun robot
Always activate the server_UAT profile
If from CI environment, also activate ci profile
Hope it is clear enough
Thanks
good idea ;-)
Hi,
I've just found our about the existence of the possibility to select the desired profiles from the env variable ROBOTCODE_PROFILES, which actually perfectly covers my needs for CI (btw it lacks the tiny explanation of the separator, which I know now that is a space, in the documentation)