Scheduling Execution Of Scripts

Ask general questions here.
Wayne_Fletcher
Posts: 10
Joined: Thu May 05, 2016 10:16 am

Scheduling Execution Of Scripts

Post by Wayne_Fletcher » Fri Sep 09, 2016 8:36 am

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.

Martin
Posts: 152
Joined: Fri Aug 15, 2014 12:24 pm

Re: Scheduling Execution Of Scripts

Post by Martin » Fri Sep 09, 2016 8:54 am

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

Wayne_Fletcher
Posts: 10
Joined: Thu May 05, 2016 10:16 am

Re: Scheduling Execution Of Scripts

Post by Wayne_Fletcher » Fri Sep 09, 2016 9:43 am

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?

User avatar
Stub
Posts: 173
Joined: Fri Jul 15, 2016 1:35 pm

Re: Scheduling Execution Of Scripts

Post by Stub » Fri Sep 09, 2016 1:00 pm

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).

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

Re: Scheduling Execution Of Scripts

Post by krstcs » Fri Sep 09, 2016 2:23 pm

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.
Shortcuts usually aren't...

Wayne_Fletcher
Posts: 10
Joined: Thu May 05, 2016 10:16 am

Re: Scheduling Execution Of Scripts

Post by Wayne_Fletcher » Mon Sep 12, 2016 10:20 am

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.

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

Re: Scheduling Execution Of Scripts

Post by krstcs » Mon Sep 12, 2016 5:16 pm

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.
Shortcuts usually aren't...