Will there be any support for OO languages in HP-QTP?
It seem to be a pain to stick to procedural kind of programming in Quick Test Professional. Often large no o开发者_C百科f lines of code need to be written which otherwise can be not required with OO langiages. What do you say?
You can still use inheritance and overloading with VBScript, although not in the same obvious way as in C++.
Check out AdvancedQTP website and articles "Class Composition" or "Function Pointers".
I have an article "Overload your VBScript functions" with code examples in my blog.
This all depends on the framework you are using. Well if you ask me its possible to develop entire framework in ur fav OOP language say either C++ or Java or Python.
Let me say how. if my Test script contains only the following script
While Environment.value("Statement") <> ""
Execute Environment.value("Statement")
Wend
You need to control the environment varialbe from outside using QuickTest API. So when you run the test it runs in an infite loop checking the value of the environment value. Now with the help of a ur fav C++ lang, u had set the environment variable value to "Browser("Google").Page("Google").WebEdit("SearchField").Set 'hello' " this value gets reflected in QTP test and executes the statement.
Hence its very much possible to develop you entire framework in java or C++. As i said it all depends on the framework ur organisation is using.
精彩评论