Page 1 of 1

Scheduling Execution Of Scripts

Posted: Fri Sep 09, 2016 8:36 am
by Wayne_Fletcher
Hello

I've been asked to set up up scheduling of scripts so they automatically execute/run at specific times on Windows 7 and Windows 10 machines.

I have searched the forums and haven't found the results I was looking for, although I'm sure I read something a couple of months ago but I don't seem to be able to find it again.

Is anybody doing this or can point me in the right direction to achieve this it would be greatly appreciated.

Thanks.

Re: Scheduling Execution Of Scripts

Posted: Fri Sep 09, 2016 8:54 am
by Martin
2 keywords:

1) Windows Task Scheduler
2) Jenkins

I myself prefer Jenkins as you can implement a full continues integration flow and have a lot of other options that benefit the test execution.

There are many topics on this forum for both of the solutions.

Martin

Re: Scheduling Execution Of Scripts

Posted: Fri Sep 09, 2016 9:43 am
by Wayne_Fletcher
Thanks

I will look into Jenkins

But in regards to Windows Scheduled Tasks, I assume that running ranorex and passing the relevant script causes it to execute? Or is there another argument/switch that forces it to run the script?

Re: Scheduling Execution Of Scripts

Posted: Fri Sep 09, 2016 1:00 pm
by Stub
I was going to suggest Task Scheduler too. Just run the exe that Ranorex builds for you and use some of the command-line switches to specify what gets tested (cases or suites).

Re: Scheduling Execution Of Scripts

Posted: Fri Sep 09, 2016 2:23 pm
by krstcs
I would suggest using Jenkins, and not messing with Windows Task Scheduler. Jenkins allows much more flexibility where WTS is much more static (you have to know exactly what you want to test when you create the task).

Also, remember that Ranorex MUST have a REALIZED, UNLOCKED desktop in order to work properly. The system (hardware or VM) that you run your tests on must not be locked, on screensaver, or logged out. You also will want to stay away from Remote Desktop and use something like VNC, as closing RDP will lock the remote system's screen.

Re: Scheduling Execution Of Scripts

Posted: Mon Sep 12, 2016 10:20 am
by Wayne_Fletcher
Thanks for the replies, really appreciated.

I looked at Jenkins over the weekend and I'm still trying to get my head around it. Seems complicated but powerful.

I think we are going to start very small and run the executable as task first and see what happens first.

Also thanks for mentioning Lock systems and screen saver stuff, we have a very closed system so there will be some discussions around policy on this, so fun and games but I can use your comments to prove my case.

Re: Scheduling Execution Of Scripts

Posted: Mon Sep 12, 2016 5:16 pm
by krstcs
We have similar security restrictions and have to keep the systems/screens locked when a test is not running.

We use a tool called LogonExpert. It allows you to lock/unlock the remote system via a command-line interface (such as a Jenkins job running a Windows Batch command or PSExec). I just have the unlock command-line in each of my test jobs right before I run the test, and the lock right after it finishes. Works great.

WARNING: DO NOT USE A REAL USER FOR TESTING!! Automated testing should use a test user that is only available on the test system as passing the username and password over the network is required for this tool to work.