Can we define Env variable outside of the .tst file?

Options
Piya
Piya Posts: 9 ✭

is there a way to define environment variables at project level instead of defining it at .tst?

Comments

  • benken_parasoft
    benken_parasoft Posts: 1,392 ✭✭✭
    Options

    You can define other types of variables outside of a tst. For example, you can reference OS or shell variables using ${env_var:name_of_variable}.

  • [Deleted User]
    Options

    You can also export an environment or set of environments to be used as reference environments. For more information on this, our documentation details this here.

  • Piya
    Piya Posts: 9 ✭
    Options

    Thank you Thomas. Referencing environment works but is there a way to just place the environment variable file only once outside at project level (like adding global data source) and use that in different .tst files?

  • jakubiak
    jakubiak Posts: 833 admin
    Options

    You need to reference the environment file in each .tst file that needs to use it.