Micro Focus QTP (UFT) Forums

Full Version: How can we call a function stored in another test ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
If say our script is stored as Test1 in QTP

And we want to call a function stored in Test1 from Test2.
Is it possible to call such a function ?

As far as i know we can call Action from different test. But is it possible to call function ??
Hello,

No, you cannot call a function from another test. All the functions should be written in library file and that library file can be attached to your test from File>>Setting>>Resources

This file is the global file and you can call the functions from this file in any test you want.

Regards,
Parminder
(08-25-2011, 12:23 PM)parminderdhiman84 Wrote: [ -> ][quote='akhilsoni776' pid='17739' dateline='1314208702']
If say our script is stored as Test1 in QTP

Hello,

No, you cannot call a function from another test. All the functions should be written in library file and that library file can be attached to your test from File>>Setting>>Resources

This file is the global file and you can call the functions from this file in any test you want.

Regards,
Parminder

Thanks Parminder for your valuable response.