Forum Discussion

sam649's avatar
sam649
New Contributor
3 years ago
Solved

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.  

3 Replies

    • 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
        Champion Level 3

        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.