I want to place all my scripts,external file and resouce files in specific folder(e.g. RI_Scripts). The system should not ask the user to provide path, but it'll auto detect the said folder and will take the data file etc from there.
The folder name is unique and can be place in any drive and any subdrive, but system qtp/vb script should able to detect it.
How to achive this?
The same thing I was able to do in Winrunner. But not able to proceed here.
The system should not ask the user to provide path, but it'll auto detect the said folder and will take the data file etc from there.
[/ QUOTE ]
This is what QTP does if you put all of your files in each test script's folder, assuming that you develop a "one" self contained script with "multiple" Actions--not the most flexible model. But I think you are saying you want to define an arbitrary folder and thereafter that is what QTP will use for all or many test scripts.
First, I am pretty sure there is no way to do this with QTP.
Second, unless you wanted just one folder to implicitly be shared by all of your test scripts it seems this implmentation would get very confusing and possibly error prone (that is, if you wanted explict folderX for scripts1-3 and folderY for scripts4-6).
Lastly, I worked extensively with WinRunner developing frameworks in '99 and '00 where I designed several startup tests to establish paths and whatnot. I don't remember finding this capability in WR, which you say you used with that tool. Just out of curiousity, how did you set that up, and in what version of WR?
I personally do not think that this is the best way to do things.
Ideally, the tester (the person running the scripts) should have the flexibility of choosing the folder. Creating an environment variable and having its reference in a XML would be the best!!
Anyways, the choice is yours! [img]/images/graemlins/smile.gif[/img]