How to run a TestModule from another TestModule ?

Bug reports.
ma.elaallouli
Posts: 4
Joined: Fri Jun 16, 2017 4:43 pm

How to run a TestModule from another TestModule ?

Post by ma.elaallouli » Mon Jun 19, 2017 10:44 am

Hi!

I want to run a TestModule from another TestModule with sending data , I tried this :
TestModuleRunner.Run("ConnexionHA","Login:"+Username);
and it triggers errors like : Can not convert 'string' to 'Ranorex.Core.Testing.ITestModule' or Can not convert 'string' to 'Ranorex.Core.CommandLine' and when I change the syntax to :
TestModuleRunner.Run(ConnexionHA,"Acheteur:"+Acheteur);
and it triggers errors too.

Please, I want a correct syntax to run a TestModule from another TestModule with sending a data .

Than you

Regards

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3929
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to run a TestModule from another TestModule ?

Post by odklizec » Tue Jun 20, 2017 9:35 am

Hi,

You can call the module like this:

Code: Select all

var myModule = new ConnexionHA();  
TestModuleRunner.Run(myModule, "command line params");  
or like this:

Code: Select all

TestModuleRunner.Run(new ConnexionHA(), "command line params"); 
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

ma.elaallouli
Posts: 4
Joined: Fri Jun 16, 2017 4:43 pm

Re: How to run a TestModule from another TestModule ?

Post by ma.elaallouli » Tue Jun 20, 2017 9:50 am

Hello ,

Thank you so much , I would like to know the syntax of command Line Params please :D

Regards

ELAALLOULI Mahmoud

McTurtle
Posts: 191
Joined: Thu Feb 23, 2017 10:37 am
Location: Benedikt, Slovenia

Re: How to run a TestModule from another TestModule ?

Post by McTurtle » Wed Jun 21, 2017 12:59 pm

Hello Mahmoud,

The syntax of the command line parameters is described in the user guide: Running Tests via Command Line

Regards,
McTurtle