Forum Discussion

ilija_panov's avatar
ilija_panov
Contributor
13 years ago

how to move\copy keyword tests form one project to another ?

Hi to all,



I have already invested a month time work in a project involving more than 200 keyword tests,  and now i realised that I have the wrong selection for a script language. The initial idea was to just use keyword test operaitons and not to use scripts at all so I didnt considered the  selction of script language and left the default.. Since I'm really not familiar with VBScript (the current selection) and I would very much prefer to use JScript (which is the most similar to C# which I know best) there is no other way than to open a new project with JScript an move (import) tests to this new project).

However I'm having problems using the File\Import\Test. I would really appreciate if you can reccomend me the best way to copy \move all the keyword tests forom one project to another. The rest of the settings like NameMapping I can make manually. 



Best Regards,

   Ilija


4 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Don't use "File | Import | Test".  That's not for importing tests from other projects but for importing tests gathered using the Test Recorder tool.



    To add an existing keyword test from a different project, simply right click on the "Keyword Tests" node in your project explorer on the left, select "Add" and then select "Existing Item".  Then browse to the keyword test you want and select OK. 



    That should do it for you.
  • Hi,



    In addition to Robert's post.

    The files you need have the tcKDTest extension and are located in the <Project>\KeywordTests directory.
  • Thanks for your advice, I'm currently adding the tests from the \KeywordsTests folder of my  VBScript project by Add\Existing Items. it seems it will take a while and i will have to group them into folders manually since the folder structure was not imported with the keyword tests.



    In additon I also did a \Merge from the context menu of the NameMapping node to copy the mappings from the old VBScript project



    Just one more question. Is it going to be a problem with the keyword tests to be used in the new Jscript project since a lot of them havevariables and data driven parameters and were created with the VBScipt setting ?



    Thanks in advance,

        Ilija

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    In my experience, bringing over a keyword test from one language to another is pretty smooth.  If you have code expressions built into your keyword test, some of those even convert nicely...if there is a problem, I've received a little warning blurp telling me about it but, again, it's pretty straightforward.