Tuesday 15 November 2011

Treeview for Quality Center Test Plan Using OTA & OTA Code Examples

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 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.    

8 comments:

thanish said...

Can any one please tell me how to get the tree view for requirements folder??

Unknown said...

Hi ,
I get the following issue when I use the Export to HP ALM

Field 'Subject': Value is Required
Field 'Test Name': Value is Required
for exporting test plans..
Any help would be appreciated

Unknown said...

Can any one please tell me how to get the tree view for requirements folder??

Unknown said...

What is the password for the attached VBA project?

PRASANNA said...

I tried the code in HP ALM and found that it needs some modification. it threws error saying ' Test Plan folder not found, evethough the folder is visible in QC. it is just going to first level folder after the Subject and not going beyond that. Please drop me a mail after correcting the code, as i am in need of it.

my mail id - prasanmgc@gmail.com

Thanks in Advance.

Unknown said...

Is there any way to get a list of test sets present in a folder and its sub folders?? My email Id is sureshmurali2003@gmail.com . Appreciate your response.

Unknown said...

Can we clone git repository in HP ALM

Jansson said...

Hi

I'm unable to download the spreadsheet. Iget the following error error when I tried to download it:

"The requested URL was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

does anyone have a copy of the spreadsheet