Forum Discussion

gingram's avatar
gingram
New Contributor
11 years ago

Query TestComplete Suite and Project Info

Is there an API (DLL) TestComplete 10 provides for .NET that can query suite and project information?  Meaning, I want to create a custom app, reference the library and then query the projects along with the test items, etc. within it.  I'm assuming you would need to point to the specific .pjs file.



Thanks in advance.
  • Hi Bobby,



    > I want to create a custom app

    In terms of TestComplete this is called Connected Application and I would recommend you to read the corresponding help section (http://support.smartbear.com/viewarticle/56563/).

    In a nutshell - TestComplete provides a COM server that provides a lot of functionality to the external application.
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Bobby,



    > I want to create a custom app

    In terms of TestComplete this is called Connected Application and I would recommend you to read the corresponding help section (http://support.smartbear.com/viewarticle/56563/).

    In a nutshell - TestComplete provides a COM server that provides a lot of functionality to the external application.
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Bobby,



    > What method would you use to retrieve a list of projects within a suite

    Sorry, but I am not sure. Maybe you'll be able to find a proper iterator in the .h files or TC SDK documentation (http://support.smartbear.com/downloads/testcomplete/sdk/).



    > Then retrieve the list of tests within that project

    Sys.OleObject("TestComplete.TestCompleteApplication", "").Integration.TestSuite("<ProjectName>") returns a reference to Count and TestItems properties. Note, that they reference only top-level test items, so you need to iterate through Sys.OleObject("TestComplete.TestCompleteApplication", "").Integration.TestSuite("<ProjectName>").TestItem(i) elements to build the complete test items hierarchy.



    Note: To ease the investigation of TestComplete object model, you can enter TestComplete.TestCompleteApplication.10 as the OleObject name for the Sys.OleObject property in TestComplete's Object Browser and drill-down using the means of TestComplete.
  • gingram's avatar
    gingram
    New Contributor
    I read over some of the documentation and examples and still having some difficulties trying to figure my issue out. 



    Let's say I create a basic project suite with one project and three tests.  What method would you use to retrieve a list of projects within a suite (should return one in this case).  Then retrieve the list of tests within that project (should be three in this case).



    It seems like you must know what the names are in advanced before working with the items for connected apps.



    One last piece of info, I'm not trying execute or even run TestComplete at this point... just trying to retrieve some pieces about a project suite outside of TC.



    Thx