Forum Discussion

glarsen_1's avatar
glarsen_1
Occasional Contributor
11 years ago

Sharing Project Items


  I am working on Test Complete again, trying to make our tests more efficient and automated, but have have run into a few problems. Up until recently we have had all of our Tests in one project in one project suite. I have decided to break our tests up into different projects int he same project suite. For example:


  In our GMS Project Suite, we will have a Projects Called:


       -Build


     -Tutorials


     -Training


     -Bugs


     -Source


 


Inline image 2


 


I have decided to go this route to make it so that if we only one to run our tutorial tests we can call it from the command line and vice versa.


 


While Attempting to do this i ran into a couple of problems. Our Tests Use the same list of tested apps. This being so i don't want to create for different tested apps files that i have to change whenever anything is updated. There would be a lot of room for error there. So i want to Create one TestedApps.tcTAs and share it between all the projects in the project suite. Whenever i try to do this Test Complete pops up an error sayings:


 


Inline image 1


 



In my projects in the project suite i want to share my TestedApps.tcAPs, my NameMapping.tcNM, my Stores.tcStores, and my Events.tcAX. (basically everything except the scripts) This would ensure that as i make changes in one project it will make all the changes in the other projects causing less errors if i forget to update something. I have been unable to do this because of the error above.


 


Is there any way around this? What exactly is the point of being able to have multiple projects in the same project suite if i can't share the tested apps and other items?


 


I hope that you can help me. I would really appreciate it!


 


I look forward to anything you can do for me!




5 Replies

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Gage,


     


    As far as I can see, you've contacted our TestComplete Support Team, and here is their reply:


     


    The TestedApps and NameMapping project items can be shared among several projects that reside in one project suite. Please make sure that you perform the task exactly as it is described in the "Sharing Project Items and Their Child Elements Among Several Projects" help topic:



     


    If the problem persists, please try to do the same with the two newly created projects and let me know your results.


     


    As for the Stores and Events items, we have a suggestion to implement the ability to share them, and your request has increased its rating. As a workaround, you can clone the existing project, and then include it in your project suite. Please refer to the "Cloning Projects" help topic for details:



     

  • sl's avatar
    sl
    New Contributor

    Hello!

    Let me jump in.

    This does *not* seem to work.

    I am still not able to share the "Tested apps" even I am pretty sure, I followed the steps in the "Sharing project items..." article.

    1. Start TestComplete.
    2. File -> New -> New Project
    3. Create the new project.
    4. File -> New -> New Project
    5. Create an other new project.
    7. Remove the "Tested apps" item of the second project.
    8. Right click on the second project: Add -> Existing item.
    9. Choose the "TestedApps.tcTAs" of the first project.
    => TestComplete throws the following error:
    Unable to add an element from the 'C:\MyTestProjects\TestProject1\TestProject1\TestedApps\TestedApps.tcTAs' file, because this element or its child element already exists in the project suite, or it is a copy of an existing element.

    You may also try it, using two different project suites for the projects in the first place. When you then try to combine both projects in one project suite by adding them via "Add" -> "Existing item", TestComplete throws the same error, when you try to add the second project.

    Tested this with TestComplete 12.31.1833.

    So it seems, it is not possbile to share the tested app between two projects in the same project suite.

    I found another thread where a community member also mentions, it is not possible:
    https://community.smartbear.com/t5/TestComplete-Functional-Web/reorganizing-my-project-completely-delete-tested-apps/td-p/74126

    So a workaorund may be to populate the "Tested apps" during runtime of your scripts, like mentioned here:
    https://community.smartbear.com/t5/TestComplete-Functional-Web/Tested-Apps-for-Project-Suite/td-p/78207

    However this also affects the project file itself. Even if you let your test clean up the "Tested Apps" as they were before the test started, you have unsaved changes in your project file afterwards. I didn't test how TestExecutes behaves then. But this is probably also not good for keeping your test files in a source control system.

    I would appreciate if the feature request for sharing the name mappings is implemented, it would also allow sharing the tested apps. See: https://community.smartbear.com/t5/TestComplete-Feature-Requests/Ability-to-share-a-Name-Mapping-file/idi-p/97545

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      As I noted in the comments of the suggestions for NameMapping sharing, for NameMapping, this is implemented.  However, it is not currently implemented for the TestedApps file.  I believe it has to do with an embedded GUID in the TestedApps.tcTAS file that TestComplete recognizes that it already is present in the project suite.  So, for now, TestedApps.tcTAS cannot be shared.  There are other project items for which this is true.

       

      HOWEVER... you can copy and paste the individual TestedApps items from one project to another.  In Project 1, open the TestedApps item, right click on the app you want to make a copy of in project 2, select copy, go to Project 2, open the TestedApps item, right click in the panel and select "Paste.  Not quite the same, but it is easier than having to recreate your TestedApps from the ground up.

      • habhoub's avatar
        habhoub
        Occasional Contributor
        Hello
        I have a project suite with one project and i want to add another project in the same project suite but i noticed that the new project created doesn't include testedapps nor stores nor namemapping items! Do you have any idea what can be the reason??
        Thank you