mu123
3 years agoOccasional Contributor
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 is the active environment, the data source should point to c:/env2/data.csv. Please let me know how to do this.
If you need exactly the name of your environment, the following can do the trick:
${#Project#TestDataPath}/Banking_Application/${=project.getActiveEnvironmentName()}/data/filename.csv