Forum Discussion

cristina88's avatar
cristina88
Occasional Contributor
8 years ago

Create an identical copy of a keyword test

I'm trying to save a keyword test using "save as" so I keep my original test and make an exact duplicate copy.  The Save As will rename my existing test.  What's the best way (other than copy all and paste into a new test) to do this?

 

( I guess I assumed like in a Microsoft Word doc if you save as and choose a different name, you would get a copy of the document.  But it doesn't work like that)

 

Thanks!

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Actually, Save As doesn't remove your initial.  It creates a copy with a new name.  If, after you select "Save as" and save, if you right click on your keyword test node and select "Add -> Existing item" you should be able to find your original.

    • cristina88's avatar
      cristina88
      Occasional Contributor

      Thanks, I just tried that with a sample test of mine, and it renamed it to my new name. I got a few weird errors about permissions and access to that folder (wonder why?!) .

       

      With the Add -> Existing item I couldn't find my original maybe because of the errors I was getting. I am also using TestComplete v12.

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Strange.  Are you using a source control of some sort? If so, it could be that there are some permissions about adding new files, etc., without checking out the folder or something.  In any case, doing a Save As should, TECHINICALLY, not erase your existing file so I think you need to investigate those permissions errors as those are probably the root cause to your problem.

         

        EDIT: Yup... something permissionwise in your TFS workspace.  Correct that, and you should be good to go.  Try doing a "Checkout" of the KeywordTests parent object and see if that corrects it.

    • cristina88's avatar
      cristina88
      Occasional Contributor

      I recreated and the error I'm getting says "An error occurred in the Team Foundation Version Control client. Reason: the item bla bla bla could not be found in your workspace or you do not have permission to access it.

       

      I'll create a new test that isn't connected to Team Foundation (as I didn't see the one copy I made, wasn't on Team Foundation Server) and try again.

      • cristina88's avatar
        cristina88
        Occasional Contributor

        Thanks, I've tried this SAVE As in the past and it just renames the current test.  This was before adding files to Team Foundation.  Either way, I just created a new test that stayed on my machine, didn't go to the Team Foundation Server at all.  It was Test2. I did a Save As Test 22.  Now it's renamed as Test22 in TestComplete. When I do the Add to Existing item, it brings me to the location of my current tests on my hdd, and I can only see Test22, not the original Test 2.  :( bummer.   Thanks though for the instructions!