Forum Discussion

sdruker's avatar
sdruker
Contributor
10 years ago
Solved

Automating testcomplete using the integration object

Hi,



I'm trying to figure out how to use the integration object.



according to  the article:



http://support.smartbear.com/viewarticle/55167/



the integration object includes special methods to perform some actions.

one of them is "to enable or disable test items.."



To obtain access to a project’s or project suite’s test items, use the TestSuite property of the Integration object. This property provides access to the test items collection of the specified project or to the test items of the currently opened project suite. Using properties of this collection, you can access the desired test item and modify its properties (name, description, timeout, enabled\disabled status and others).



I don't understand how to iImplement it.



I created the "integration" object , and "testsuite" object that uses the "projecttests_comaccess" object which should provide access to the test items of the project,

but I can't find information of the method and uses of the  "projecttests_comaccess" object, and how to modify the testitems properties















  • Hi Sivan,



    Refer to the "Enabled Property" article - it contains a sample demonstrating how to use the ProjectTests_COMAccess object’s properties to obtain the ProjectTestItem_COMAccessobjects.


     

4 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Sivan,



    Refer to the "Enabled Property" article - it contains a sample demonstrating how to use the ProjectTests_COMAccess object’s properties to obtain the ProjectTestItem_COMAccessobjects.


     

  • Thank you Tanya,



    I read the article you suggested, the example is using a tree structure :

    Set TNode = MainForm.ItemsTree.Nodes.Add(ATestItem.Name, tvwChild, , "Stop on exception: ")



    I tried to implement this example but I'm getting that the mainform and itemstree object are required

    What am I doing wrong?






  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Sivan,

     


    The sample fills in the tree control with TestComplete test items. If you don't want to do this, you can just remove the PopulateItem function.Then, your code may look like this:


     




    ' Iterates through the project’s test items


        ' And displays them in the tree view


        For i = 0 To ItemsCount - 1


          Set TestItem = ProjectItems.TestItem(i)


          if ProjectItems.TestItem(i).Enabled Then


          .....


       End For



  • Hi Tanya,



    I do want to use the PopulateItem function , but I don't understand what is the "mainform" and "itemstree" objects.

    I'm getting an error that these object are required.



    MainForm.ItemsTree.Nodes.Add(ATestItem.Name, tvwChild, , "Stop on exception: ")



    Sorry if my question sounds stupid but I'm not familier with Visual Basic syntax. 



    Are this objects related specifically to this example (should I replace them to suite my project)?

    Should I create\declare them before using them?



    I see that in the c# example there is a part of declaring the tree node and in visual basic there is no such part.