Running user code module in side recording module

Ask general questions here.
pansujit
Posts: 18
Joined: Mon Apr 18, 2016 2:56 pm

Running user code module in side recording module

Post by pansujit » Fri Mar 10, 2017 5:28 pm

Hello,
Is it possible to run user code module inside recording module? suppose;
I have user code module ---------- abc.cs
recoding module --------------------def.rxrec
inside the "def.rxrec" I have user code----------xyz()
I want to run my "abc.cs" inside the "xyz".
IT has come to know me, that recording module can be run using recModuleName.start() but I don't know how to run the user code module.

Thanking you
Sincerely
Sujit Pandey

jma
Posts: 111
Joined: Fri Jul 03, 2015 9:18 am

Re: Running user code module in side recording module

Post by jma » Mon Mar 13, 2017 11:04 am

Hi Sujit,

I would recommend against starting any module from other modules. This will make it very difficult to read the current structure of the test suite, especially when debugging issues within your test script.

If you have methods that you want to reuse and share between different recording modules, I would suggest creating user code collections as described at the following link: http://www.ranorex.com/support/user-gui ... thods.html

I hope this will help you.

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Running user code module in side recording module

Post by krstcs » Mon Mar 13, 2017 3:51 pm

I would agree with jma, this is not the way to do things.

Ranorex also highly discourages starting test modules from inside other test modules.

The whole point of making modules is so that everything is self contained and you can then just drag-and-drop the modules where you need them in the test suite.

You should be making your modules as small as possible and limit their functionality to as few actions as possible (ideally just one atomic action). This will allow for greater reuse and ease maintenance.
Shortcuts usually aren't...