Automating Function Libraries
Almost most of the Automation projects do have Function Librares .We can make our script compact and precise
by calling these functions as on where required.The testcase flow can even me mapped to excel, objects also can be mapped into excel files.
I believe the majority of the time is spent on funcion library creation.Could we automate(may be partially) the creation of function library files.
Lets have an example--->
Step1 :Perform GUI Manipulation
...../*Provide your implementation*?.....
Here the steps are not sequential and can overlap eah other as required .Optional steps can be there.such as calling of different function like Func a--->Func b
or anything what the business need.
Thus the fuction may look like:
here BoolGUI=gui to be manipulated
database =is used
etc, etc, the function can accept additional features when requird.
Any input is welcome.
Re: Automating Function Libraries
You're question is not very clear.
What exactly are you trying to automate - The creation of function libraries? This is like saying you want the computer to program for you without doing the hard work!
In terms of expanding your function for the future, QTP (or really VBscript) does not allow you to specifiy optional paramaters so if you change the function later on by adding a parameter, you run the risk of causing previous scripts to fail.
One solution is to create your own class and then pass an object of that into your function. That way in the future, any additional parameters you wish to pass to the function you can add to the class and it won't affect the backwards compatability of your scripts.