Forum Discussion

sam649's avatar
sam649
New Contributor
4 years ago

What is the best way to reuse Keyword Test

Hi,

My main project contains a utility project which contains many Keyword Tests. I would like to reuse these Keyword Tests inside my testing projects. However, I don't want to import the Keyword Tests to my testing projects because I don't want to pollute my testing projects with Keyword Tests of the utility project.

So, my question is: is there a way to call the Keyword Tests from another project without importing them?

  • Turning them into scripts won't help.  You'll still need to teach the main project that the utility scripts exist, and that still means sharing.

     

    I think a clean way to do it would be to make a folder in the main project called Shared Tests or Utilities or something and put them all in that folder.  

    • sam649's avatar
      sam649
      New Contributor

      Thanks Marsha for your reply,

      The problem with that sharing is that my testing project will get polluted with Keyword Test files from the other project. So, it could look messy if I have a lot of Keyword Tests to share. So, is there a way to avoid sharing, and can still use the Keyword Test? I am thinking of converting all Keyword Tests to scripts. With scripts, I don't have to share it inside my testing project. Would you think whether it could be a good solution, best practice...?

      • Marsha_R's avatar
        Marsha_R
        Moderator

        Turning them into scripts won't help.  You'll still need to teach the main project that the utility scripts exist, and that still means sharing.

         

        I think a clean way to do it would be to make a folder in the main project called Shared Tests or Utilities or something and put them all in that folder.