Page 1 of 1

Modular Design Calling a common Test/Function

Posted: Wed Mar 08, 2017 7:07 pm
by nas
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

Re: Modular Design Calling a common Test/Function

Posted: Thu Mar 09, 2017 10:38 am
by qwertzu
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

Re: Modular Design Calling a common Test/Function

Posted: Thu Mar 30, 2017 12:09 am
by nas8424
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?

Re: Modular Design Calling a common Test/Function

Posted: Fri Mar 31, 2017 10:10 am
by qwertzu
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