Execution via Scheduled Task: Arguments ignored

Ask general questions here.
bennylew
Certified Professional
Certified Professional
Posts: 24
Joined: Wed Sep 17, 2014 10:43 am

Execution via Scheduled Task: Arguments ignored

Post by bennylew » Wed Jan 07, 2015 8:53 am

Hi people,

I work with Ranorex 5.2.1 on Windows 7 64bit.

I want to set up virtual machines and plan and trigger our Tests with scheduled tasks. This works fine, except for the arguments.

Action setup for scheduled task
Program/Script: "C:\Program Files (x86)\Ranorex 5.2\Workspace\Google\Google\bin\Debug\Google.exe"
Arguments: /rf:report.rxlog

This setu is only an example, my test opens IE, calls google.com and checks if the search button exists. The report name is also just temporarily.

When I run this scheduled task, the execution works, but no report is generated. For debugging I tried to execute the following command on cmd:
"C:\Program Files (x86)\Ranorex 5.2\Workspace\Google\Google\bin\Debug\Google.exe /rf:report.rxlog"

This works fine on cmd, but not on scheduled task. Does anybody have the same problem and know hot to solve it?

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

Re: Execution via Scheduled Task: Arguments ignored

Post by odklizec » Wed Jan 07, 2015 9:20 am

Hi,

I guess the problem is that the report argument has not specified path and therefore points to "program files"? And if the scheduled task is not started in admin priviledges, it cannot write to "program files". So you either need to specify a report path outside the "program files" or you need to instruct the task scheduler to run your job with admin priviledges. It should be possible by enabling "Run with highest privileges" task scheduler option.
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

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

Re: Execution via Scheduled Task: Arguments ignored

Post by krstcs » Wed Jan 07, 2015 2:41 pm

I would recommend that you try using Jenkins instead of task scheduler. It is much more useful in these types of situations because it can run any batch script that you tell it. I find it much easier to manage than using each individual machine's task scheduler since you can manage multiple systems from one central server.
Shortcuts usually aren't...

bennylew
Certified Professional
Certified Professional
Posts: 24
Joined: Wed Sep 17, 2014 10:43 am

Re: Execution via Scheduled Task: Arguments ignored

Post by bennylew » Thu Jan 08, 2015 9:29 am

Thanks for your replies.

@odklizec: Unfortunately this hints doesn't solve my problem.
@krstcs: I already read about Jenkins. For the CI we actually want to use TFS, so is it possible to run TFS and Jenkins in parallel mode (TFS for building and Jenkins for plan and execute the testsuites?)

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

Re: Execution via Scheduled Task: Arguments ignored

Post by krstcs » Thu Jan 08, 2015 2:45 pm

I don't use TFS, so I couldn't tell you for sure about it, but I don't see why you couldn't. Jenkins doesn't care and I doubt TFS will either.
Shortcuts usually aren't...

bennylew
Certified Professional
Certified Professional
Posts: 24
Joined: Wed Sep 17, 2014 10:43 am

Re: Execution via Scheduled Task: Arguments ignored

Post by bennylew » Mon Jan 12, 2015 3:24 pm

I solved the initial problem by specifying not the "arguments", but the "start in" parameter für the schedule task. Now the report will be saved in this location.