Micro Focus QTP (UFT) Forums
Functions - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Functions (/Thread-Functions--6086)



Functions - mrajeshtnl - 02-27-2012

I am a beginner in QTP,
here what i know about the functions is
Functions are of two types
1).Built in Functons(built in functions are the functions which are designed by the vendor and we no need to worry bout the logic of the function)
2).Userdefined functions(which are designed by the user and reusing that functions for multiple times in any other test script)
(a).Public Function
(b).Private Function

and where as we use advanced user defined functions to perform the valdations..

but i dont know about the generic functions..
can any one help me by differntiating about functions and generic functions?

Thanks


RE: Functions - inborntester - 02-27-2012

we can classify user defined functions in to 1. Generic Fcuntion 2. Business Function.

Generic functions are not specific to application business logics, it developed for common programming needs. like you can develope a user defined function to compare two text files and return result and like other common needs. it can be used for other projects also when using same testing tool.

Business functions are application business specific. Like Booking ticket, Loign like. Might not be used in other projects.


RE: Functions - mrajeshtnl - 02-27-2012

Thank you inborntester
Generic Functions we use for validations
and Business functions for business operations, iam i correct? if not correct me

Thanks


RE: Functions - inborntester - 02-27-2012

i dont get the scope at which you mean the validation. on the automation script we are comparing expected output with actual output at few lines of script either checkpoint or custom codes meant as validation on automation script scope. for validation we can use both generic and business functions at direct or indirect, or the vaildation may be part of functions. functions may be used for validation, but might not be only for that. its for the benefit for reusability on whatever need.




RE: Functions - Ankur - 02-28-2012

@mrajeshtnl: Please make sure to use descriptive titles while opening new threads. Simply saying "Functions" doesn't make much sense.