Page 1 of 1

Run configuration is ignored when run from command line

Posted: Wed Apr 17, 2019 9:34 am
by vax12
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?

Re: Run configuration is ignored when run from command line

Posted: Wed Apr 17, 2019 9:38 am
by odklizec
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.

Re: Run configuration is ignored when run from command line

Posted: Wed Apr 17, 2019 9:41 am
by vax12
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

Re: Run configuration is ignored when run from command line

Posted: Wed Apr 17, 2019 9:47 am
by odklizec
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 ;)

Re: Run configuration is ignored when run from command line

Posted: Wed Apr 17, 2019 9:48 am
by vax12
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....

Re: Run configuration is ignored when run from command line

Posted: Wed Apr 17, 2019 9:55 am
by odklizec
Well, then I'm out of ideas ;) Have you, by any chance, tried to simulate the problem with fresh new solution?

Re: Run configuration is ignored when run from command line

Posted: Wed Apr 17, 2019 10:30 am
by vax12
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.......

Re: Run configuration is ignored when run from command line

Posted: Wed Apr 17, 2019 11:30 am
by odklizec
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

Re: Run configuration is ignored when run from command line

Posted: Wed Apr 17, 2019 12:13 pm
by vax12
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.

Re: Run configuration is ignored when run from command line

Posted: Wed Apr 17, 2019 12:16 pm
by odklizec
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 ;)

Re: Run configuration is ignored when run from command line

Posted: Sun Feb 16, 2020 11:44 pm
by dnshRnrx
Thanks lot. Its help me. even I faced same issue. :) :)

Re: Run configuration is ignored when run from command line

Posted: Tue Mar 08, 2022 10:23 am
by hsarmah2021
Hi all, I am facing this issue now with Ranorex 10.1.6. I merged a different branch to the current branch and after the merge all the testcases of the current branch get ignored with when executed with the run configurations, also checked the .rxtst file and it shows the run configs properly. I only have a single test suite in my project, please help!

Re: Run configuration is ignored when run from command line

Posted: Wed Mar 09, 2022 9:53 am
by odklizec
Hi,

Without seeing the test suite, it's hard to tell what exactly is wrong in your case. Could you please share the test suite? Does the run configuration works if the test suite is started from Ranorex Studio? Please share also the command line you are using.