Forum Discussion

DeepikaRamasamy's avatar
DeepikaRamasamy
New Contributor
4 years ago

Integrate Testcomplete (Python) Core Framework with Nexus / JFrog Artifactory Repository

Hi All,


We are trying to centralising the Testcomplete Framework (Python Code with in-built methods of Testcomplete) outside the Testcomplete Editor in-order to implement "Central Repository" similar to Maven Dependency for Java. 

 

Kindly let me know if anyone has implemented Centralising the Framework and use it as a Dependency in the Testcomplete Project.

 

Please assist me on how to centralising the Framework Code & access testcomplete in-built methods. 

 

Much appreciated for your help in advanced.

 

  • AlexKaras's avatar
    AlexKaras
    4 years ago

    Hi,

     

    I am sorry but this will not work either.

    Test Project in TestComplete is the primary and self-containing entity in TestComplete. Everything that is required for test execution must be a part of this given test project.

    Components of test project (script units, keyword tests, ...) can be located in project's subfolders or as external items, but must be explicitly included in the project.

    Project suite is just a container to unite one or more test projects and to make it possible to run more than one project in one go. The only possible data exchange between projects that are part of some project suite is via Suite Variables.

     

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    HI,

     

    Not sure what you are trying to get... Some sample example might help.

    Obviously, TestComplete's methods cannot be used without TestComplete/TestExecute.

    And script files can be stored within any repository.

     

    • DeepikaRamasamy's avatar
      DeepikaRamasamy
      New Contributor

      Hi AlexKaras,

      Thanks for your response. 

       

      We are trying to achieve ‘Centralising the Framework (Common / Re-usable code)’ in some Repository (Git / Shared Path / Nexus as a Python Package) in-order to be used as a dependency for Multiple projects.

       

      Note: This is similar to Maven Dependency for Java Project, we are looking forward to move the Framework layer outside Testcomplete Project. By setting the Path of Common code as a Sys Path, trying to execute Script inside Testcomplete / TestExecute.

       

      Can you suggest how can we achieve this, we tried the below approach

       

      Steps we tried:

       

      • - Placed the Framework (Common Code) outside the Testcomplete Project (Testcomplete Editor)
      • - Inside Testcomplete imported the Framework (Common code) in-order to Execute one of the TestCase (Eg: Click on the Tab in the application)

      Please find the Approach.png file for more info

       

      Challenges:

      • - Able to access Common Code, but some of the Testcomplete related in-built methods like ‘aqObject , Delay, Log etc.,’ are not accessible (Since Framework / Common code is kept outside Testcomplete)
      • - Receiving an Error "NameError : name 'aqObject' is not defined"

       

       

      Kindly let me know is there any better way to achieve ‘Centralising the Framework’

       

      Much Appreciated for your help in advance.

       

      Thanks. 

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        Still not sure what exactly and what for you are trying to get.

        Components of TestComplete project (script units, keyword tests, etc.) can be located at any location within your network and can be added to any TestComplete project via the Add Existing Item functionality. So you can organize all your reusable code/entities into some standalone folder and reference required items from this folder into your projects.

        Test code that uses TestComplete's internal objects can be used from within TestComplete only. Likewise Java code can be used only with Java runtime.

        You must explicitly add required resources (script units, keyword tests, unit tests, etc.) to test project.

         

         

        > - Receiving an Error "NameError : name 'aqObject' is not defined"

        Can you provide a screenshot of TestComplete (screenshot of the whole application) at the moment when the error occurs?