Showing posts with label Function. Show all posts
Showing posts with label Function. Show all posts

Tuesday 7 January 2014

HP QTP : What is the difference between functions and actions in QTP




               QTP Action
                 Function
  • Action is a QTP concept and it can use QTP features like own Object Repository, Data Table, checkpoints etc.
  • Actions help make your Test modular and increase reuse. Example: You can divide your script into Actions based on functionality like Login, Logout etc.
  • It is slow in execution.
  • Functions is a VB Script programming concept and do not have their own Object Repository or Data Table. Functions help in re-use of your code. Ex:  You can create a Function in your script to concatenate two strings.
  • We can’t use checkpoints in functions, instead of checkpoints we can use validation points (Loops and Conditional statements)
  • Functions are faster in execution than Actions