Forum Discussion

PDinkel's avatar
PDinkel
New Contributor
15 years ago

Get Projects of Projectsuite through the ITCIntegration Object

Hello,

i am writing a c# programm for automated test schedule.

I want make the programm more dynamic. Is it possible to get

all the projects from the projectsuite?

I use TC4.



ps:

There is a way to parse the pjs file to get the projects,but i think its dirty.



Greets Paul

6 Replies

  • Hello Paul,



    You can get a list of projects in a project suite in the following way:

    //...


    string item;


    ItcProjectSuiteTests_COMAccess SuiteItems = (ItcProjectSuiteTests_COMAccess)IntegrationManager.get_TestSuite("");


    for (int i = 0; i < SuiteItems.Count; i++)


    {                


      item = SuiteItems.get_TestItem(i).ProjectName;


      // ...


    }


    //...


    Please see the Integration Object and Integration.TestSuite help topics for more information.
     
  • PDinkel's avatar
    PDinkel
    New Contributor
    Hello i am using TestComplete 4.

    Is it possible that the ItcProjectSuiteTests_COMAccess object, is only at TC 7 available?



    Greets Paul

  • Hello Paul,





    You are right, the ProjectTests_COMAccess object is available in TestComplete 5-7. Unfortunately, TestComplete 4's COM model does not provide the object and some essential interfaces to implement code to accomplish your task. So, I suggest that you upgrade the tool to the latest version.
  • PDinkel's avatar
    PDinkel
    New Contributor
    I would instantly upgrade, but this is not my decision ;). But i solved this problem with xpath ;)

    Greets
  • zildarius's avatar
    zildarius
    Occasional Contributor
    Hello!



    Can I get access from Delphi application to TestComplete TestSuite?

    My code:



    uses TCConnect;

    ...

    procedure some;

    var

         i : integer;   

    begin

      TC.Visible := true;

      TC.Integration.OpenProjectSuite(Edit1.Text);

      i := TC.Integration.TestSuite('').count;

    end;




    But I have error EOleSysError with message "Member of group not found".