Forum Discussion

Melbournian's avatar
Melbournian
New Contributor
8 years ago

Unable to load Project suite after cloning a project

Hi there. Am a novice user of TestComplete (version 12). I am facing issues while loading a cloned project.

I cloned the project to run scripts for a new version of our product.

However when I try to load the project in TestComplete, message is displayed

 

The following project elements have the same keys:

{A6F9CA00-3514-477D-A7B4-E3B8C12BE3DB}
BT_RegressionTestSuite_Win2008_2012 | B_v9.x.x | Script | EmailTestResults
BT_RegressionTestSuite_Win2008_2012 | B_v10.x.x | Script | EmailTestResults

 

The project suite (or project) cannot be opened."

 

The Help menu says "Locate files corresponding to project elements that cause the conflict and rename them"

 

How do I resolve this?

 

 

 

7 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    I'm not sure what you did to clone the project, but it looks like you've ended up with two tests with the same name in the same project.  

     

    Try going to out to Windows and renaming one of the duplicates, then open the project.  You may have to add the renamed file back into the project.

  • Bobik's avatar
    Bobik
    Frequent Contributor

    I'm not sure that you 'cloned' your project from TC context menu.
    I think you just copied some files in windows explorer. Am I right? This is usual way to reach same error.
    Right way to clone project is right click at project node in project explorer. Then select 'Clone Project...'.
    But if you used context menu - the error is definitely a bug in TC.

    • Melbournian's avatar
      Melbournian
      New Contributor

      I cloned the project from the right click option available on the Project node in Project Explorer.

      After some analysis I observed that ID in testMoniker is not unique for some project elements 

      <testItem name="GUI Verify" key="{57EAF4A9-099A-44F1-A71C-733A17DF9671}" group="False" enabled="True" testMoniker="{82D9CAD7-4C50-49F9-BE4D-744800446EE5}

       

      Hence it throws an error when I load the project suite as 

      The following project elements have the same keys:

       

      NOTE - The names of the .mds and .tcLS files in both the projects are unique.

      • Bobik's avatar
        Bobik
        Frequent Contributor

        Well, I recommend you to open a support case. If you report this behavior as bug you will help many other testers in future.

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Melbournian:

    Hi,

     

    Just in case you haven't solved this yet, I would suggest the following:

    -- Make a backup of your cloned project suite (just copy all folders structure to some other folder);

    -- Assuming that B_v9.x.x\Script\EmailTestResults.s* and B_v10.x.x\Script\EmailTestResults.s* files are physically different ones, rename one of it in the Windows Explorer;

    -- Open your test suite in TestComplete. You should get a message that one of the script units (the one you've just renamed) cannot be found. This item will be grayed-out in the Project Explorer in TestComplete. Right-click this item and call the Delete\Remove context menu command;

    -- Rename the renamed file back to its original name;

    -- Right-click the Scripts node in TestComplete and select the Add | Existing Item... command. Point to the just renamed file, add it to the project suite and save changes;

    -- Close the test suite and open it again - check if the message has gone.

    • Melbournian's avatar
      Melbournian
      New Contributor

      Hi Alex,

      Thanks for your reply.

      I observed that when the project is cloned, only the .mds and .tcLS files are cloned into the cloned project folder.

      In the the project explorer under the cloned project, I can see all the child nodes under main folders (Advanced, Events, Script, Keyword Tests etc.) have an arrow mark pointing downwards . If I right click on any one of them and do 'save current as' to the cloned folder the arrow sign disappears.

      Is this expected behavior of the 'Clone Project' feature?

      As there are a lot of files which have the conflicting issue in the cloned project, it would take almost 4-5 hours for me to save them in the cloned folder. (I don't see any option to do a group 'save current as' for all child items under a main folder.

       

      Regards,

      Ashley

       

       

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        That is strange behavior.  I just tried a quick "clone" myself of a JavaScript project I'm playing with.  When I did the clone, all the files, not just the MDS file, copied over to the new directory.  The only exception is the few script units and keyword tests that are stored in directories outside of the main project path.

        Now... as an experiment, I right clicked on my Advanced\Script object (the parent object for script units, not the script files themselves) and clicked "Save Current As" and saved that script object into a directory outside of the main project path.  When I did that, I got the following message:

         

        The behavior described in this message is exactly the error that you are reporting... that there are elements in your projects that are shared between projects that have non-unique keys.

        Could you confirm that the project that you have cloned did not have these major components shared?  As a note, you can share script files, keyword tests, NameMapping, and individual stored objects under stores between projects.  Sharing major nodes like Scripts, KeywordTests, and the Stores parent object is not recommended for this precise reason.