During my current assignment I was asked if I could provide the data table parameters I used in all my HP Quick Test Pro test cases. Normally this would mean opening QTP, export the data table to an Excel file and open the next test case. Since I had to do this for more than 200+ test cases and they were all on the HP Quality Centre server (which means the test cases would open even slower than usual) I tried to find a faster solution.
I used Python 3.4 and the Quality Center OTA API to access the data directly on the QC server and download it to a local drive.
First the Python class to connect to QC OTA:This class returns the connection object so we can now use it to retrieve all the testcase data in our script.
This class returns the connection object so we can now use it to retrieve all the testcase data in our script.
All the QTP test case data is now stored in the specified folder. Which in my case meant writing a simple script to extract the default.xls, which contained the parameter data, from every folder and rename it.
Please take caution when extracting lots of data from the QC server. Especially the ExtendedStorage can cause the server to crash. Hence my little wait function to keep IT support of my back.