| || |
Run QTP 9.5 script from QC 9.2 with a specified fo
I have a folder structure which is like this:
Automation Folder (main Folder)
Application Specific Function
The way I run the script is I have a driver script which access the main data table under the "Data Table" folder and depending on the particular scenario that is set as "yes" I go to the specific case, access the data table for the case and call the case specific function which is stored in a vbs file under the "Application Specific Function" folder. I also load all the library function from the "Librarary Functions" folder using a execute file command. During test run I generate a excel testlog and store it in the Results Folder. The basic setup is like this:
TestName = Environment.Value("TestName")
CurrentDir = Environment.Value("TestDir")
CurrEnvironment = Left(CurrentDir,(Len(CurrentDir)-Len(TestName)-1))
'the test log will be stored in the Results_Folder
xls_Test_Log = CurrEnvironment & "\Results_Folder\"& "xlsTestLog_" & month(date) & "_" & day(date) & "_" & year(date) &"_" & hour(now) &"_" & minute(now) &"_" & second(now) & ".xls"
'load librarary vbs file
ExecuteFile CurrEnvironment & "\Library_Functions\library_function.vbs"
'load application specific vbs file
ExecuteFile CurrEnvironment & "\Application_Specific_Function\Common_Functions.v bs"
Main_Data_Table = CurrEnvironment & "\Data_Table\xxx.xls"
'call function to read data table and decide on the scenario execution
'Go to the specific case which is set as "YES" and finish process and loop till there is no data in the main datatable
This process works absolutely fine in my local machine where in the "CurrEnvironment" variable I have the relative path till the main "Automation Folder".
I want to replicate the same thing in QC. I will be storing my single driver script in the "Test Plan" and would select the same script in "Test Lab" for execution. How do I need to replicate the folder structure in both "Test Plan" as well as "Test Lab" to do the same stuff as I was doing in my local machine. I will have to make calls to function in vbs files from a folder, access datatables in specific folder and during execution my excel testlog will be created which I want to store in a specified folder.
Any suggestion on how to achieve this. Please do let me know for both "Test Plan" as well "Test lab" how to organize my folders so as to be able to replicate the same things that I do in my local machine. Please also mention any other points that I am missing.