Forum Discussion

Kamal_chennai's avatar
Kamal_chennai
Contributor
10 years ago
Solved

How can i access other projects script routine

Hi, i have a two projects like "Test1", "Test2". the script routine was created in "Test2". i may access the Test2's script routine via "Add Existing Item"(i.e.,Reference.png ) i dnt want that meth...
  • altus_nel's avatar
    10 years ago
    Hi Kamal,



    Did you manage to access the links provided? In any event... So.... you have (in your example) 2 projects. Let's say you created In project 2 (in your case Test 2) a script routine that you now want to "call" in Test 1. As per [http://support.smartbear.com/viewarticle/56535/] this is not technically possible. You have some options available to get past this:


    • Add a script unit that contains the routines defined in the other project (you will have to copy and paste (the problem i have with this is maintenance).


    • You can create a "library"  unit and add them to your projects as needed.


    Another option (that i prefer) is to write an extension for TestComplete. If you have routines (functions) that you use accross different projects, it would make sense to store these functions in 1 location. Have a read through this resource.



    The simplest way for you to achieve your goal is the simply copy and paste the routine (function) to the other unit in the other project.



    Hope this clears it up somewhat :)



    Altus