Modular Design Calling a common Test/Function

Ranorex Spy, Recorder, and Studio.
nas
Posts: 5
Joined: Wed Mar 08, 2017 7:01 pm

Modular Design Calling a common Test/Function

Post by nas » Wed Mar 08, 2017 7:07 pm

I have multiple Tests (Test 1, Test 2, ... etc) that are in their own Ranorex Project/Solution. I realized that there are some inconsistencies so want to create common modules that are called by each of the Ranorex Projects/solutions. Is there anyway for me to create a common module (call it Test-Common), and have the other Tests (Test 1, Test 2, ... etc ) call the common module (Test-Common) (or jump into and back to the original test). This way, I do not have to reproduce/maintain and possibly have inconsistencies. I am looking for a way to call a common function/module (or test). Thx

qwertzu
Posts: 178
Joined: Wed Jan 25, 2017 11:08 am

Re: Modular Design Calling a common Test/Function

Post by qwertzu » Thu Mar 09, 2017 10:38 am

Hi nas,

So you want to use modules within different Solutions?
You can easily add modules from otherr testsuites by right clicking on your project and add an existing item (see screenshot)

regards,
qwertzu
Attachments
addItems.png
addItems.png (24.03 KiB) Viewed 513 times

nas8424
Posts: 1
Joined: Tue Mar 28, 2017 5:04 pm

Re: Modular Design Calling a common Test/Function

Post by nas8424 » Thu Mar 30, 2017 12:09 am

The existing item needs to be selected, what after that, what are all the items to include

The Ranorex Solution File
Recording
cs File

All?

qwertzu
Posts: 178
Joined: Wed Jan 25, 2017 11:08 am

Re: Modular Design Calling a common Test/Function

Post by qwertzu » Fri Mar 31, 2017 10:10 am

Hi nas8424,

it depends on what exactly you want to use from another project.
If you simply want to use recordings, or code modules, you have to choose the specific module after clicking at "Existing Item" and navigate to your project folder, to choose i.e. "recording1.cs".

If you want to add a whole project, you can right click on your solution and select add existing project (see screenshot). Afterwards, you will have to navigate to the project folder and select the .csproj file.

I hope, this helps.

regards,
qwertzu
Attachments
addProject.png
addProject.png (24 KiB) Viewed 441 times