In a main test I use (C:\CVS\QTP\FW\Tests\MasterTest\DemoTest)
*Environment("FWRootDir") = PathFinder.Locate ("..\..\..")*
It returns me the root of the framework, but it doesn't solve the problem
with libraries.
It is possible to include the libraries by ExecuteGlobal, but it will be
nightmare for debugging. For now I've decided to add the list of library
files to QTP Resources, when I develop test, and load them when I execute
it.
But if run QTP from vbs file, you can get the path from
WScript.ScriptFullName, and load the library files.
On Thu, Sep 11, 2008 at 11:35 AM, DMachado <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I am new to QTP and have a basic structure question for storing QTP
> files. Is it possible to store test files (Tests, Function Libraries,
> Repositories, etc.) in a directory that will change constantly without
> having to update the test each time? The home directory will change
> for each new build of the application I am testing. However, once
> that home directory is found, all the files will be in the same
> directory tree within it.
>
> Example:
>
> Before: C:\Product\1\QTP_Tests\Test1
> C:\Product\1\QTP_Tests\Test2
> C:\Product\1\QTP_Tests\Library1.vbs
> C:\Product\1\QTP_Tests\Repository.tsr
> $ENV{QTP_Tests} = C:\Product\1\QTP_Tests
>
> After:
> C:\Product\2\QTP_Tests\Test1
> C:\Product\2\QTP_Tests\Test2
> C:\Product\2\QTP_Tests\Library1.vbs
> C:\Product\2\QTP_Tests\Repository.tsr
> $ENV{QTP_Tests} = C:\Product\2\QTP_Tests
>
> I will be kicking off the run of tests from a VBScript I created.
> Within that I will utilize the system envrionment variable
> $ENV{QTP_Tests} to call the main Test. I am hoping to find a way to
> use this environment variable within QTP so it knows that any Reusable
> Actions, Function Libraries, and Repositories used within this test
> can be found at this same $ENV{QTP_Tests} directory.
>
> Please let me know if you'd like any extra information from me about
> my setup.
>
> Thanks in advance for any ideas!
> Dave
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "QTP
- HP Quick Test Professional - Automated Software Testing" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
-~----------~----~----~----~------~----~------~--~---