I have just started taking a look at integrating QTP tests with QUality Centre. I don`t like hard coding function library locations into tests via the QTP gui so each test calls an initialisation script function that loads the function libraries and shared object libraries for each test. Because we are in the early days with our QTP test development, I expect the directory structures may change in the future so we don`t want to be hard coding function location paths etc into our tests. We have already split our original OR`s into smaller logical OR`s since the implmentation of QTP 9.1 and for our three different products we have automated so far it has just been a case of changing the single initialisation script for each product to load or not load the new smaller OR`s.
My question is, how can I achieve the same thing in QC? I thought I would be able to create a vbs script that is placed at the start of each test set that configures QTP but have found that when the first test is run, the settings are lost which is what I suspected would happen. ALso, each test is open in read only mode by QTP so it does not seem likely that the exact same method that I used when for initialising my scripts previously would work either because the initialisation script removes libraries and OR`s and then add new ones which results in a changed test each time, which I think won`t work I don`t think if the test is open in read only mode.
Alternatively, how do others achieve the same thing. I can`t imagine it being good practice to add the function libraries and OR`s to every single test via the QTP gui?
I am starting to think along the lines of having a VBS script outside of QC that extracts the scripts and libraries from QC before running the tests but this doesn`t seem right to do. We would then have to report back to QC the results also which makes me think wonder why bother storing them in QC anyway. And also, starting the test would then be out of the control of QC also.
Maybe others can share how they integrate QTP tests into QC without just using record/playback and local repositories and hard coded function library names and locations?
Firstly QC is just the revised name for TD.... also your functions would be better off being called as external resources. You can run/open QTP scripts from QC, you just have to make sure that any external files associated with QTP scripts have the relevant updated links within the folder structure you have created.