How to start tests in Ranorex Agent from command line?

Best practices, code snippets for common functionality, examples, and guidelines.
Jaromir
Posts: 4
Joined: Thu Nov 15, 2018 12:55 pm

How to start tests in Ranorex Agent from command line?

Post by Jaromir » Thu Nov 15, 2018 1:09 pm

Hello,

I've a problem with starting tests in Ranorex Agent from windows command line.
Image

All is ok if I start it without /agent argument.
Attachments
ranorex.png
ranorex.png (49.56 KiB) Viewed 93 times

User avatar
RobinHood42
Posts: 242
Joined: Fri Jan 09, 2015 3:24 pm

Re: How to start tests in Ranorex Agent from command line?

Post by RobinHood42 » Fri Nov 16, 2018 8:49 am

Hi,

Please ensure that there is a *.rxtst file within your execution folder("bin/Debug").

Also, please ensure that you're using the latest Ranorex version, currently Ranorex 8.3 and also the latest Ranorex agent

Cheers,
Robin

Jaromir
Posts: 4
Joined: Thu Nov 15, 2018 12:55 pm

Re: How to start tests in Ranorex Agent from command line?

Post by Jaromir » Fri Nov 16, 2018 9:03 am

Hi,

yes, there is *.rxtst file in the folder /bin/debug.

Name *.exe file in bin\debug: ABC.Tests.exe
Name *.rxtst file in bin\debug: Loss.rxtst

Ranorex Studio version: 8.3
Ranorex Agent version: 4.1.

It is working if I start it from Ranorex Studio.

There is the problem if I start tests from command line with /agent argument. (I've tried rename the file ABC.Tests.exe - to Loss.exe but without success)

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

Re: How to start tests in Ranorex Agent from command line?

Post by odklizec » Fri Nov 16, 2018 9:13 am

Hi,

Are you using multiple test suites in your solution? In this case, you must add /testsuite parameter and define the rxtst you want to run.

At next, that D: drive is shared/network drive? Ranorex does not support running tests from shared/network drives (nor is optimized to do so) so you should not do that.
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

Jaromir
Posts: 4
Joined: Thu Nov 15, 2018 12:55 pm

Re: How to start tests in Ranorex Agent from command line?

Post by Jaromir » Fri Nov 16, 2018 9:52 am

Hi,

I've tried add argument /testsuite but result is the same.

Cmd line:

Code: Select all

cd /d D:\.jenkins\workspace\ABC_TEST-RANOREX\ABC.Ranorex\ABC.Tests\bin\Debug 
ABC.Tests.exe /testsuite:Loss.rxtst /runconfig:Default /agent:http://myServer1:8082/api/  
D:\ is local volume

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

Re: How to start tests in Ranorex Agent from command line?

Post by odklizec » Fri Nov 16, 2018 11:09 am

Hi,

Well, in this case, I would suggest to contact Ranorex support via their support form...
https://www.ranorex.com/support-query/
Command line support for Ranorex agents is still a very fresh functionality (released in 8.3), so maybe there is a bug, or something wrong with your solution, that was not expected by Ranorex folks?
What happens, if you run the very same solution from Ranorex Studio (via configured agent)? Does it work?
Also, have you tried to run a simplified test? Just create a new solution, with single test suite and see what happens.
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

Jaromir
Posts: 4
Joined: Thu Nov 15, 2018 12:55 pm

Re: How to start tests in Ranorex Agent from command line?

Post by Jaromir » Mon Nov 19, 2018 8:05 am

Hi,

ok - I will contact support team

Buphagus
Posts: 7
Joined: Sat Jul 02, 2016 3:04 am

Re: How to start tests in Ranorex Agent from command line?

Post by Buphagus » Fri Nov 30, 2018 4:16 am

Where to find the agent command line options? (what are the options? :)

I have just upgraded studio from 8.0 to 8.3.1 In both versions a remote agent works.
but I too can't dope out the command line to get it to work.

[2018/11/29 18:58:49.602][Failure][TestSuite]: Could not find matching test suite file for.... name.rxtst' using the 'testsuite' command line parameter.

From the debug folder (windows 10), C:, I specified my exe i.e ....\bin\debug\test.exe /testsuite:xxxx
where xxx is the rxtst file (suite.rxtst) or the fully qualified path, bounded with double quotes

Thanks,
Bup

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

Re: How to start tests in Ranorex Agent from command line?

Post by odklizec » Fri Nov 30, 2018 8:59 am

Hi,

All Ranorex command line options can be found in User Guide here:
https://www.ranorex.com/help/latest/ran ... ex-studio/
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