Run Test suite with windows task scheduler

Ranorex Spy, Recorder, and Studio.
Posts: 2
Joined: Thu Sep 29, 2016 10:48 am

Run Test suite with windows task scheduler

Post by TheBestKBever » Fri Nov 25, 2016 11:19 am

I want to run a ranorex test suit with windows task scheduler
Please can somebody advise on how to go about with this task.
Untitled.png (60.93 KiB) Viewed 1164 times

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

Re: Run Test suite with windows task scheduler

Post by odklizec » Fri Nov 25, 2016 12:39 pm


I would personally suggest using something more advanced to control and run the tests (like Jenkins), but if you insist on Windows task scheduler, here are some points:

At first, the machine on which you want to run your test must be always ON and logged in! This is the biggest drawback of using task scheduler.
Then you simply need to define new task (via task scheduler) UI, with trigger and action. Here is the basic task I've used before switching to Jenkins:
TaskScheduler.png (30.71 KiB) Viewed 1158 times
As you can see, the Action runs a cmd file, which contains all necessary commands to start the Ranorex tests. Here is the content of my CMD file:
cd %~dp0\bin
RHMonitoring.exe /rc:RHMonitoring
Where first line sets working directory, to the one from which is started the CMD file + added 'bin' directory, where is located test exe.
Second line simply starts the test.exe with necessary arguments (in this case run configuration)
And third line terminates the cmd file after test is finished.
You also need to define a trigger, which actually starts the test (let's say every 15 minutes).

That should be all? Hope this helps? ;)
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