Skip to content

[QUESTION] Extending project specific profiles variables in user global robot.toml configuration #649

Description

@MarvKler

Hi @d-biehl !

I have a question about combining robotcode profiles from the project specific robot.toml and from the user global robot.toml files.

Let's say we have two independent test automation projects (two separate git repositories) from two different development teams - team1 and team2. Each project has its own project specific robot.toml which defines profiles used for the test execution.
Now, there is a tester from a central team (team3) and he needs to execute tests from both teams. Therefore, he must define two user global environment variables which contains e.g. the access key for each project.

We have the following robotcode configuration files:
Project robot.toml - Team 1:

[profiles.team1-dev.env]
APPLICATION_NAME = "AppName1"    # project specific variable defines the app name

Project robot.toml - Team 2:

[profiles.team2-dev.env]
APPLICATION_NAME = "AppName2"    # project specific variable defines the app name

Global User Configuration - robot.toml:

[profiles.team1-dev.extend-env]
USER_SPECIFIC_VARIABLE = "AccessTokenTeam1"

[profiles.team2-dev.extend-env]
USER_SPECIFIC_VARIABLE = "AccessTokenTeam2"

In those three robot.toml examples you can see that the user needs to set e.g. an access token variable in his global user configuration, but depending on the selected profile in the projects, a different variable should be used.

I have tried this approach, but actually the env variable USER_SPECIFIC_VARIABLE is simply not found by RF when executing the test with profile team1-dev.

Question 1: Is this use case currently implemented and should it work ?
Question 2: What do you think about such a use case like extending project specific profiles with user global configurations ?

I'm asking because we had this topic today at work and we were not able to get this running.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions