Forum Discussion
You can use the Storages object to either read an INI file or an XML file. You can also create a TestComplete custom binary file or store the information in a registry. I, personally, use the INI file method to read configuration settings from a file before starting a test.
Thank you tristaanogre . I did refer the testcomplete documentation and understood how it is being done
https://support.smartbear.com/testcomplete/docs/reference/program-objects/storages/ini.html
I would also like to know the best way to implement it, lets say i have two script units - A and B
In UnitA if create a object to read the INI file and then trying to use it in a different unit
[UNITA] def Test: ini = Storages.INI("C:\MyFile.ini")
What would be the best way to use it in UNITB?
- Assign "ini" object to Project variable and make use of it elsewhere instead of trying to read it again
- Or Call [UNITA].Test() and fetch the object using the return statement
- tristaanogre5 years agoEsteemed Contributor
Six one way, half a dozen the other.
Personally, I lean away from using global variables and prefer to reference code units.- sriram_sig5 years agoContributor
Thank you
Related Content
Recent Discussions
- 10 hours agojstaehlin
- 2 days agoAivanitskiy