scripts getting failed when executed by scheduled task

Ranorex Spy, Recorder, and Studio.
bheemuabhigna
Posts: 49
Joined: Thu Feb 03, 2011 3:15 pm

scripts getting failed when executed by scheduled task

Post by bheemuabhigna » Wed Feb 16, 2011 2:15 pm

Hi,

we have scheduled our scripts to run on our client machines at particular times twices a day.
The scripts executes and send the execution status in an excel to mail.
Daily we are getting failed status for all test cases. The reason will be some object not found in particular test cases.
The scripts executes fine when we execute them maually and I have scheduled it some time and observed that it is executing fine from scheduler.

But dont know whats happening when I come morning I am getting status as all failed. No doubt that the script is getting initiated as we are getting the report.

Can anyone tell me what might be the reason?. I have set Wake up the computer option also

Thanks
Abhigna

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: scripts getting failed when executed by scheduled task

Post by Ciege » Wed Feb 16, 2011 4:00 pm

When the tests fail is the computer locked? If there is no available desktop then the automation will not have a GUI to work with and will fail when finding objects. Just waking the computer will not work it also need to be unlocked and logged in.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

bheemuabhigna
Posts: 49
Joined: Thu Feb 03, 2011 3:15 pm

Re: scripts getting failed when executed by scheduled task

Post by bheemuabhigna » Thu Feb 17, 2011 10:45 am

Hi Ciege,

Thanks for the information provided

Thanks
Abhigna

bheemuabhigna
Posts: 49
Joined: Thu Feb 03, 2011 3:15 pm

Re: scripts getting failed when executed by scheduled task

Post by bheemuabhigna » Thu Feb 24, 2011 1:20 pm

Hi,

We have removed the lock option in the system where the execution is scheduled.
The problem is the scheduled task is added in machine available in client environment.
If I open the machine through remote desktop and keep it open the scripts will get passed.
If I close the remote desktop the scripts are getting failed.
As this is a seperate machine the scripts should execute on the machine seperately.
But , Why are the scripts getting failed when I close RDP window?
Have anyone experienced this issue before?

Thanks
Abhigna

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: scripts getting failed when executed by scheduled task

Post by Ciege » Thu Feb 24, 2011 3:45 pm

Because when you close the RDP session there is no longer an available GUI for your AUT to run in. Therefore, Ranorex (or *ANY* automation solution) will fail when trying to find objects and elements... They just won't exist when there is not an available desktop to execute in.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: scripts getting failed when executed by scheduled task

Post by Support Team » Thu Feb 24, 2011 5:52 pm

bheemuabhigna wrote:But , Why are the scripts getting failed when I close RDP window?
The following forum post may also be interesting for you:
http://www.ranorex.com/forum/running-au ... t1295.html

Regards,
Alex
Ranorex Team
.
Image

bheemuabhigna
Posts: 49
Joined: Thu Feb 03, 2011 3:15 pm

Re: scripts getting failed when executed by scheduled task

Post by bheemuabhigna » Tue Mar 15, 2011 9:55 am

Hi,

We were able to solve this issue.

The scripts are getting executing fine when RDP session is closed also, the issue was with system getting locked.
We removed the lock option and now everything works fine.

Thanks,
Abhigna

User avatar
artur_gadomski
Posts: 207
Joined: Mon Jul 19, 2010 6:55 am
Location: Copenhagen, Denmark
Contact:

Re: scripts getting failed when executed by scheduled task

Post by artur_gadomski » Thu Mar 17, 2011 8:54 am

How did you do that?

bheemuabhigna
Posts: 49
Joined: Thu Feb 03, 2011 3:15 pm

Re: scripts getting failed when executed by scheduled task

Post by bheemuabhigna » Fri Mar 25, 2011 1:54 pm

It was a remote machine and so itteam from client side have worked on this.
We can get informating from windows sites also for removing this lock functianlity and also the process differs to each operating system.