Specifying configuration file on command line
We saw how to specify a variable with psvar on the command line, but we think we will have a lot of variables to specify. I thought I would use a csv file or a json file and we are using python. I saw the below on the internet for reading a json file, so it seems I should be able to use variable to get the fileName path. Can I use this mechanism to apply variables for an entire project? Is there a way to have variables that apply to an entire suite?
function test() { var fileName = "d:\\testFile.json"; var txt = aqFile.ReadWholeTextFile(fileName, aqFile.ctANSI); var obj = eval("(" + txt + ")"); Log.Message(obj.Person[0].Name); }
Having large number of variables can be cumbersome to manage, and documenting these is a thing of the past!
I recommend using .ini (https://en.wikipedia.org/wiki/INI_file) to store your configurations settings, which can be easily modified.
Alternative approach is to use ADO Components, where you can manually specify the connection string.