Run configuration is ignored when run from command line

Ask general questions here.
vax12
Posts: 6
Joined: Mon Jun 11, 2018 12:42 pm

Run configuration is ignored when run from command line

Post by vax12 » Wed Apr 17, 2019 9:34 am

Hi all,
I am using the latest Ranorex version (9.0.1) & I have a solution with 2 different run configurations. Whenever I run the tests over Ranorex Studio (via Run button), the execution is correct in that the test cases from the current active configuration are executed.
However if I switch to command line, the execution simply seems to ignore the run configuration and starts with the execution of the first test from my test suite (used both rc:RunConfig and runconfig:RunConfig options). I checked the .rxtst file and the testconfigurations appear there with the testcontainer id's.
Does anyone have any idea what the issue might be?

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

Re: Run configuration is ignored when run from command line

Post by odklizec » Wed Apr 17, 2019 9:38 am

Hi,

I'm using run cofigurations a lot in my projects and I'm not experiencing any problems with them. So my guess is that there is either something wrong with your solution or the command line you use. Could you please post full command line you are using? Thanks.
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

vax12
Posts: 6
Joined: Mon Jun 11, 2018 12:42 pm

Re: Run configuration is ignored when run from command line

Post by vax12 » Wed Apr 17, 2019 9:41 am

Thanks for your answer. Here it is:
".\SolutionName\bin\Debug\SolutionName.exe" /runconfig:RunConfig /pa:mode=continous_integration /pa:domain=mydomain.com /tcdr:Browsers=1 /ju /zr /zrf:.\Reports\Report-Build-%BUILD_NUMBER%.rxzlog

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

Re: Run configuration is ignored when run from command line

Post by odklizec » Wed Apr 17, 2019 9:47 am

Hi,

Well, if your run config is really called "RunConfig", then I think you should rename with to something more sensible. I guess the problem is that RunConfig is considered by Ranorex as 'runconfig' command line keyword and therefore it fails ;)
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

vax12
Posts: 6
Joined: Mon Jun 11, 2018 12:42 pm

Re: Run configuration is ignored when run from command line

Post by vax12 » Wed Apr 17, 2019 9:48 am

Thanks, it has another name, I just used it as an example :). So no obvious error there, I really have no idea where to look to find a solution....

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

Re: Run configuration is ignored when run from command line

Post by odklizec » Wed Apr 17, 2019 9:55 am

Well, then I'm out of ideas ;) Have you, by any chance, tried to simulate the problem with fresh new solution?
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

vax12
Posts: 6
Joined: Mon Jun 11, 2018 12:42 pm

Re: Run configuration is ignored when run from command line

Post by vax12 » Wed Apr 17, 2019 10:30 am

With a new solution it works just fine, so there seems to be a problem with my solution.
I even deleted my configuration, created a new one and the rxtst file updates correctly with the new testconfiguration and its cases, but the execution is still faulty. Hmm.......

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

Re: Run configuration is ignored when run from command line

Post by odklizec » Wed Apr 17, 2019 11:30 am

Hi,

Could it be that you are using multiple solutions in 'broken' solution? In this case, you may need to specify solution name in the command line as well! Otherwise, I would suggest to send the solution to Ranorex support for review.

BTW, just in case, check if there is not defined a command line in debug/release settings of your solution! I believe it overrides command line arguments posted from the command line? I once did such mistake and nearly smashed my head against the wall :D
DebugCMDArguments.png
DebugCMDArguments.png (17.27 KiB) Viewed 166 times
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

vax12
Posts: 6
Joined: Mon Jun 11, 2018 12:42 pm

Re: Run configuration is ignored when run from command line

Post by vax12 » Wed Apr 17, 2019 12:13 pm

Thank you very much odklizec for trying to solve this puzzle with me :).
Together with a colleague we compared the test solution and my original solution and realized that the problem stemmed from an automatically generated .rxsqc file. Reading about it here https://www.ranorex.com/help/latest/ran ... estsuites/ I don't really understand why it was generated in my case, as I only have one suite within the solution, but that was the cause of the problem. As I have just one suite, I simply deleted it and now my runconfiguration settings are working.

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

Re: Run configuration is ignored when run from command line

Post by odklizec » Wed Apr 17, 2019 12:16 pm

Cool! So it was indeed caused by the multi-testsuite configuration. Good to hear you found the reason of the issue. Thanks for posting your solution. It may help someone else in future ;)
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