Ranorex Console Application - pass in name of recording

Ranorex Spy, Recorder, and Studio.
brentmclauclan
Certified Professional
Certified Professional
Posts: 23
Joined: Wed Jun 25, 2014 11:59 am

Ranorex Console Application - pass in name of recording

Post by brentmclauclan » Tue Jul 15, 2014 3:52 pm

Hi there

I'm trying a Ranorex Console Application, and from command line launch I'd like to pass in the name of the contained recording to run.

Within the program.ca file's main method - the names comes in as a String type (and as such it does not have a Start method).

I'm thinking that I need to cast the passed in name "recording1" to a Ranorex Recording type so that if has a start() method. A code snippet sure would be helpful as I'm not getting too far with code assist.

Thanks

Brent

Tnimni
Posts: 49
Joined: Thu Jan 02, 2014 4:03 pm

Re: Ranorex Console Application - pass in name of recording

Post by Tnimni » Tue Jul 15, 2014 4:16 pm

Hi,

1. You can use the following command line parameters
testcase|tc:<name or guid of test case>
Runs this test case only.

testsuite|ts:<path to test suite file>
Runs the test cases defined by the test suite (rxtst) file.
2. You can use the Ranorex Test Suite Runner, mark V on the cases you wish to run, compile and than run the EXE. It will only run the test cases marked with V
3. You can write pure C# code, instead of recording and incorporate nUnit as described here http://www.ranorex.com/blog/using-nunit ... -execution

brentmclauclan
Certified Professional
Certified Professional
Posts: 23
Joined: Wed Jun 25, 2014 11:59 am

Re: Ranorex Console Application - pass in name of recording

Post by brentmclauclan » Tue Jul 15, 2014 5:09 pm

Hi

The project Ranorex Console Applciation does not have a test suite within it (no *.rxtst) to run.

Just wondering if there is a means to cast string to type Ranorex recording (or something similar).

Thanks

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

Re: Ranorex Console Application - pass in name of recording

Post by krstcs » Tue Jul 15, 2014 6:16 pm

So, my question would be why did you create a .NET Console Application solution instead of creating a Ranorex Test Suite solution when you are trying to run tests? I'm not sure I understand the logic.

If you are going to run tests then you should be using Ranorex's built-in test solutions. A console application is not designed for running Ranorex tests.
Shortcuts usually aren't...

Tnimni
Posts: 49
Joined: Thu Jan 02, 2014 4:03 pm

Re: Ranorex Console Application - pass in name of recording

Post by Tnimni » Tue Jul 22, 2014 2:58 pm

brentmclauclan wrote:Hi

The project Ranorex Console Applciation does not have a test suite within it (no *.rxtst) to run.

Just wondering if there is a means to cast string to type Ranorex recording (or something similar).

Thanks
If you could share the code, i will understand better.

I really think it's something simple, but can't tell without the code