Running the automated testing in background?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Niroj@Work
Pro Scripter
Posts: 63
Joined: Thu Dec 10, 2009 8:13 am

Running the automated testing in background?

Post by Niroj@Work » Wed Mar 24, 2010 5:05 am

Hi All,

1) Can we run automated test execution in the background and do other works? But here the execution needs to focus the application window under testing most of the time.

2) Can we hide the input while giving passwords?
Like: Input>Enter the password?,pass
Where while entering the password should not be visible e.g. "*****"

3) Can we do SSH without paying more?

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Mar 24, 2010 9:03 am

Hi,

1) You cannot send keystrokes/mouse events to a window that is hidden or not visible.

2) Set INPUT_PASSWORD to 1. See the HELP file topic for the Input command.

3) There is no native SSH support. So you would have to use a third party tool/library in conjunction with Macro Scheduler.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Niroj@Work
Pro Scripter
Posts: 63
Joined: Thu Dec 10, 2009 8:13 am

Getting IO Error 32!! While doing SFTP using WinSCP

Post by Niroj@Work » Wed Mar 24, 2010 12:06 pm

Macro Script
================
IfFileExists>C:\Documents and Settings\niroj_p\Desktop\crt_ea.txt
DeleteFile>C:\Documents and Settings\niroj_p\Desktop\crt_ea.txt
Endif

RunProgram>"C:\Program Files\WinSCP\WinSCP.exe" /script="C:\Documents and Settings\niroj_p\Desktop\getscript.txt"

Label>Cont
IfFileExists>C:\Documents and Settings\niroj_p\Desktop\crt_ea.txt
ReadFile>C:\Documents and Settings\niroj_p\Desktop\crt_ea.txt,res
Mdl>res
Else
wait>0.1
Goto>Cont
EndIf

=========================================
File_Name: C:\Documents and Settings\niroj_p\Desktop\getscript.txt
===========================================
open sftp://login_name:password@server_name:22 -hostkey="ssh-rsa key id"
get "/nfsusers0/kumar_as/crt_ea.txt" "C:\Documents and Settings\niroj_p\Desktop\"

===========================================

The above code I am using for downloading a file called "/nfsusers0/kumar_as/crt_ea.txt" in Unix Server to Window desktop "C:\Documents and Settings\niroj_p\Desktop\". I am able download the file but when I am trying to synchronize by checking the existence of that file in my desktop it throwing a macroscheduler error, i.e. "IO Error 32 ! "

Any Idea?

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Mar 24, 2010 12:10 pm

You are trying to read the file while it is still downloading, before it has finished downloading.

Add this before the Run Program line:

Let>RP_WAIT=1

In future could you please start a new topic for, well, new topics, rather than add them to unrelated topics.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Niroj@Work
Pro Scripter
Posts: 63
Joined: Thu Dec 10, 2009 8:13 am

Post by Niroj@Work » Wed Mar 24, 2010 12:30 pm

Thanks Marcus for your quick reply.
Sorry for posting this question here. Actually, as you suggested to use the third party SSH tool; I tried it in this way and hence posted it here.

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

testing inside a virtual machine

Post by adroege » Tue May 18, 2010 8:53 pm

1) Can we run automated test execution in the background and do other works? But here the execution needs to focus the application window under testing most of the time.
What I do is have my testing machine virtualized in a VMWare session. I then connect to that virtual machine with Remote Desktop (RDP). That way I can easily move the RDP window off to the side, and do other stuff on my local machine while the test scripts run. Note, you cannot however minimize the RDP window, because then it doesn't really exist, and the script cannot move the mouse or send keystrokes..... so just move it almost out of sight and it works fine.

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts