Methods For Re-Using Tests Between Projects

Ask general questions here.
Posts: 2
Joined: Wed Jul 24, 2019 4:50 pm

Methods For Re-Using Tests Between Projects

Post by Andrew.Finkernagel » Fri Jul 26, 2019 1:26 pm

I have been preparing automated tests for web apps that are built on a common framework. Many of the apps have shared elements and require similar test cases. Ranorex has been an excellent solution in many ways for this task. I'm able to copy and paste the shared elements from repository to repository, and in the cases where elements are identified in slightly different ways, I'm able to just adjust their XPaths accordingly. It's made the processes fairly simple to create.

The issue I'm struggling with is implementing the similar tests that exist between projects. Ideally, I would like to keep my project repositories separate from each other, but have some recording modules that are able to be shared between them. For example, I build a test for Project A, and I'd like to be able to take the steps that I built for that test and implement it into Project B, and then just drag my Project B repository items into the module's targets. My attempt to do this yesterday through some copying and pasting wound up merging a whole bunch of Project A repository items into my well-organized Project B repository, leading to some moments of absolute panic.

Today I had the idea of copying and pasting the modules in the Projects Explorer view. I'm now staring at a screen giving me options about how to handle the repository references that don't exist in the target Project. I'm considering doing this and choosing the option to link repositories, so my target project's repository doesn't get messed up. But this all seems fairly inefficient and I feel like I'm missing something. Any advice out there?

User avatar
Posts: 284
Joined: Wed Jan 25, 2017 11:08 am

Re: Methods For Re-Using Tests Between Projects

Post by qwertzu » Mon Jul 29, 2019 1:13 pm


You have a few options of sharing recording modules between projects.
If you choose the option of linking the repository, you must be careful because changes are also effective in other projects where you use this repository. But in my opinion, this option would meet your requirements.
More save would be choosing the option of copying the repository to the project. However, this will make your project way larger than just linking it because it creates a second repository in the project.

regards, qwertzu