I've uploaded a spreasheet containing examples of how to interact with the Quality Center OTA Test Plan and Test Lab Modules.
You can download the spreadsheet here.
The VBA Code Included also has examples for other OTA interactions as follows:
You can download the spreadsheet here.
The examples attached to the buttons show a tree view selection dialog for the Test Plan.
The VBA Code Included also has examples for other OTA interactions as follows:
Test Plan (QCTestPlanCommonFunctions)
- TestPlanCopyPasteTest - Uses OTA to copy a Test Case in the Test Plan.
- TestPlanCreateFolderStructure - Uses OTA to create a folder structure in the Test Plan.
- TestPlanDoesPathExist - Uses OTA to return True / False if a directory / path exists in the Test Plan
- TestPlanDoesTestExist - Uses OTA to return True / False if a test exists in the Test Plan.
- TestPlanFindTest - Uses OTA to return a test for a given path and/or it's subfolders
- TestPlanGetSubjectNode - Uses OTA to return a Folder as a Subject Node object
Test Lab(QCTestLabCommonFunctions)
- TestLabAddTestToTestSet - Uses OTA to add a test to a test set in the test lab.
- TestLabCreateDirectoryStructure - Uses OTA to create a directory structure in the test lab
- TestLabCreateTestSet - Uses OTA to create a test set in a directory
- TestLabDoesFolderExist - Uses OTA to Returns True / False as to whether a folder exists
- TestLabGetFolderByPath - Uses OTA to returns a TestSetFolder object for a given path
- TestLabGetTestSet - Uses OTA to return a TestSet for a given path
A couple of things:
- This code can sometimes fail after being run several times. I can't find the reason why, but usually closing Excel and reopening it fixes the issues.
- In your code, if you have a loop that creates a folder and then uses "TestLabGetFolderByPath" to find it, you may find it fails. Inserting a call to the function "RebootQCCon" resolves this.