Automating QTP Test Automation Home Automation Articles Downloads QTP Gotchas Links Books Contact About Site Map
What's with all these crazy function names?
You've probably noticed by now that I use rather odd function names like 'zGen_LockPC' and 'zFile_ReadString'. Why do I do this? - well it's what you have to do when you start accumulating large numbers of generic functions. When you're in QTP and looking at the list of your library functions (in the Available Keywords pane), if you give them all simple names then firstly, you can never find the one you want and secondly the generic functions get mixed up with application specific functions. To handle this situation, I have developed some function naming conventions: All generic functions start with a lower-case 'z'. Browser generic functions start with 'zBro_'. File handling functions start with 'zFile_'. Totally generic functions start with 'zGen_'. Html functions start with 'zHtm_'. QTP specific functions start with 'zQtp_'. SQL functions start with 'zSql_'. Web element functions start with 'zWeb_'. This means: All related functions will be logically grouped together. Application specific functions will appear at the top of the list where you can get to them easily. |