Hi, Is there a way to make the test complete project to read a single file (json or csv) that controls all parameter/variable values? For example, we have different environment to run the test. S...
In my project, I have the mapped object 'browser' which uses a project variable, it's default value is "chrome",
and the main page uses conditional expression, based on the environment that I use,
I use Storages.INI method to read my configuration file, which consists of a database string, browser (Chrome or Edge), and environment (either http://als.nightly.nonauth..., http://als.uat.nonauth..., http://als.reg.nonauth..., http://als.ps.nonauth..., etc).
I've defined a singleton class (singleton is a design pattern, where we can create only one instance of a class and that instance can be accessed globally) to read the .ini file. This is called at the beginning of all my JavaScript files, to setup up the variables.
Alternatively, you can also use TestComplete Command Line with /PrjVar parameter, to pass in your environment value