Forum Discussion

vgummala's avatar
vgummala
Occasional Contributor
13 years ago

GetSubSection and GetOption Mechanism

Thanks for your help,



I need to understand the "GetSubSection" method mechanism, hence please let me know on this for below scenario.



1) INI file in Storages.INI



    ProjectSuite.Variables.IniFilePath =     Storages.INI(Files.FileNameByName("Test_INI"));



2) When I use ProjectSuite.Variables.IniFilePath.GetSubSection(TestID).GetOption(TestOption, "Not Exists"), what is the internal mechanism is been performed.



3) I also would like to know the above method depends on the size of INI file used. For eg : If INI file has 30000 lines with 3000 subsections and other with 100000 with 4000 subsections how would be the process time of ini file and its reliablity?



4) While assigning a section name to some variable whether the total ini file is brought into the memory till that variable persists (as in step - 1) or evertime it refers to INI file to get the value of specified option in the subsection (in step - 2).



Please provide us in detail about the mechanism followed in above scenarios and more in detail about GetSubSection and GetOption functions.

3 Replies

  • Hi,


    When you call the Storages.INI method, TestComplete loads the whole INI file to memory. The loaded file has a tree-like structure. The nodes of the tree are the sections and options stored in the INI file. When you call the GetSubSection, GetOption or other methods, TestComplete works with the tree stored in memory. So, the bigger your INI file is, the longer TestComplete loads the file into memory and performs different actions over it.


    Also, I recommend that you read the Section Object help topic.

  • vgummala's avatar
    vgummala
    Occasional Contributor
    Thank you for the information SmartBear Forums.



    Thanks in advance for my next query

    -------------------------------------



    I am curious to ask, could you please tell me what is the maximize INI file size that can support 'TestComplete' Or you can tell me whether this will support minimum of 5MB.



    This will helps me a lot.






  • Hi,


    There are no size limitations for INI files. However, it is obvious that the larger the INI file is, the slower TestComplete will work with it.