Forum Discussion

mu123's avatar
mu123
Occasional Contributor
3 years ago

Assigning active environment name to a variable in ReadyAPI

I have two environments set up for a project. Let's call them env1 and env2. When I set env1 as the active one, the data source used in the test should point to c:/env1/data.csv. Similarly, if env2 i...
  • KarelHusa's avatar
    KarelHusa
    3 years ago

    If you need exactly the name of your environment, the following can do the trick:

     

    ${#Project#TestDataPath}/Banking_Application/${=project.getActiveEnvironmentName()}/data/filename.csv