Access the Component during Run time through OTA and VB
Can any one please help me with either code snippet or reference document to access the Component factory and component's fields like Description, Design Steps' steps and other details via OTA and VB code.
I want to do custom reporting where actual results are updated at component level or component design steps
The OTA API reference document in the product's Documentation Library provides the info you need. It includes sample code though not specifically for getting information from a Component. However, getting information from a Component is very similar to getting info from other types of entities (Tests, Defecs, etc.). first you need to instantiat the correct factory (i.e. ComponentFactory). Then you use the NewList method to retrieve the entities you want, optionally using the Filter object to filter what items you want retrieved. Your resulting list is then a list of objects of the type you retrieved. You can look at each item in the list and access information from it based on the methods available for that type of entity. If the entity doesn't have specific Properties for the values you are trying to get, you can always use the Field property to access other database fields in the table where info about that entity is stored.
However, if you are trying to obtain actual execution results stored in QC, accessing the ComponentFactory and Component object probably will not be sufficient. Those would give you information from the Business Process module, where Components are created. Results of testing are stored elsewhere. I haven't worked with BPT and Components before so I don't know the details. Generally results are stored in the Run object with associated Step objects. Runs are associated to Test Instances (TSTest objects) which are in turn stored in Test Sets (TestSet object) in Test Set Folders (TestSetFolder object) in the Test Lab area.
(Opinions and information contained in this post are wholly my own and do not reflect the opinions of my employer.)