persistz / WebTesting_Common_Function_for_UFT_QTP

A function library for UFT/QTP web GUI testing
2 stars 0 forks source link

ChangeRequest : Function Names #1

Open persistz opened 4 years ago

persistz commented 4 years ago

@PramodKumarYadav

Hello George, I have recently moved jobs and is introduced with testing Oracle Forms (and thus UFT as a tool of choice). Considering the popularity of UFT, I was expecting to get a lot of function libraries for re-use but could only find yours on GitHub (so my complements for you being the one and only on github). I cloned your repository for further use but I have a suggestion on the way functions are named. Going by clean code principles, I think; -The leading term Func_ can be safely removed from all functions? -The names now have a noun-verb style (Browser_Launch). Normally a verb-noun (powershell type naming) sounds more intutive (ex: Launch-Browser). Ofcourse the consequence is now we cant see all the functions related to Browser but considering UFT doesnt give intellisense for custom functions, may be its not that big an issue? An alternative could be to make submodules for function libraries with name say Web-Browser.vbs . I am not sure. Give it a thought and tell me what you think about it. If you approve of the suggestions, I can make a branch and create a pull request with changes. Finally, Kudos for putting a useful library for use! Cheers, Pramod

persistz commented 4 years ago

Hi Pramod,

Thanks for your suggestions. Regarding the first point, I personally do not think this is a good modification at present. Due to the functional limitations of VBS and the editor, adding a unified prefix can help user to filter existing functions in the code, which is convenient for long-term maintenance with a group. Of course, the other reason for this is that the code is short and no corresponding documentation to introduce every func, so I used a uniform naming style.

The second point is very good. Please feel free to create pull requests or I can invite u as a collaborator?

I updated the code without a detailed inspection recently. If you find any syntax problems, please feel free to update.