Run Qtp script when system is locked? is it possible if yes do suggest whats need to be done?

2,000 views
Skip to first unread message

Crazyprincess

unread,
Jan 5, 2010, 9:04:01 AM1/5/10
to QTP - HP Quick Test Professional - Automated Software Testing
Hi All,

Happy New Year!!

I would like to know if there is way to keep running the script of QTP
when system is locked if yes please do give the process for it?

In advance thanks you all!

Mrinal

unread,
Jan 5, 2010, 9:26:11 AM1/5/10
to mercu...@googlegroups.com
Hey if  you one to run only one script u can schedule is using windows
schedular,if u want to run batch of script from QC then u have to
write a VB script using QC with Open Test Architecture which will
drive qtp to run one by one scripts from QC.

> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to Mercu...@googlegroups.com
> To unsubscribe from this group, send email to
> MercuryQTP+...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en


--
regd,
mrinal

Andrey

unread,
Jan 5, 2010, 2:52:39 PM1/5/10
to QTP - HP Quick Test Professional - Automated Software Testing
Hi,

Locked system is a secured system - operating system restricts API
that
allows programmatic emulation of keyboard and mouse input.
I wouldn't expect QTP to work in a security lock mode.

By the way, QTP imitates user actions - how can a user act on your AUT
if
computer screen is locked?

Regards,
Andrey

B.

unread,
Jan 5, 2010, 6:15:51 PM1/5/10
to QTP - HP Quick Test Professional - Automated Software Testing
The only way to overcome that is to set up a virtual machine using
VMWare or VirtualBox (without a screensaver or lock password) and
install QTP within that virtual machine.

Then you can lock your workstation (maintaining any security) and
still run tests.

Kevin

unread,
Jan 6, 2010, 5:13:55 AM1/6/10
to QTP - HP Quick Test Professional - Automated Software Testing
"The QuickTest Professional computer is locked or logged off." error
message will be displayed, if the system is locked while running
automation scripts.Even a single script will not get executed.

Thanks
Gopinath Subramaniam

Testing Solutions

unread,
Jan 6, 2010, 9:00:20 AM1/6/10
to QTP - HP Quick Test Professional - Automated Software Testing
I believe you can do that

Write a VB Script code that invokes QTP, load script and run that.
put that VB Script in Schedule Task and provide it with the login
credentials.
this way you can run QTP script when machine is locked.


Azhar Mehmood

Mrinal

unread,
Jan 6, 2010, 9:37:55 AM1/6/10
to mercu...@googlegroups.com
Yeah Azhar this way I have executed my batch run scripts,but I was
working on client pc I mean to say i do a remote desktop login on
client pc from my local pc so if my computer got locked,It wont make
any difference to the PC where i was executing the scripts.

Bhavya Gonepudi

unread,
Jan 6, 2010, 1:33:02 PM1/6/10
to mercu...@googlegroups.com
Andrey,

This can be done even when system is locked as i was able to run scripts before when i modify regedit option but was wondering if we have any other options as this option is working sometime on some machine not on all.

Crazyprincess

unread,
Jan 6, 2010, 12:15:17 PM1/6/10
to QTP - HP Quick Test Professional - Automated Software Testing
Hi All,

As suggested by experts above even if we write the vb code to invoke
QTP , as one point for example if we are running the script for 500
users after 30 or 40 user still we would be facing same issue.I know
one option was to edit regedit option of skipenvironmentcheck for
hkey_current_user which will make keep to work even when system is
locked.As i was wondering if anyone can suggest me any other solution
and coming requesting for new VM is matter of cost to client? but let
me debug all th ways i can if i do find any solution i will update my
states and onces again thank you for the quick solutions.Onces again
thanks all.

Thanks,
Bhavi!

Kevin

unread,
Jan 12, 2010, 1:42:11 AM1/12/10
to QTP - HP Quick Test Professional - Automated Software Testing
Hi Mehmood,

Could u pls send me the code that invokes QTP ?
And also how can v put the script in Schedule Task ?

I think u can help me to get it better.

Thanks mehmood...

> > > In advance thanks you all!- Hide quoted text -
>
> - Show quoted text -

Kevin

unread,
Jan 12, 2010, 1:43:42 AM1/12/10
to QTP - HP Quick Test Professional - Automated Software Testing
Hi Mrinal,

Could u pls send me the code that invokes QTP ?
And also how can v put the script in Schedule Task ?

I think u can help me to get it better.

Thanks Mrinal...

> mrinal- Hide quoted text -

Mrinal

unread,
Jan 12, 2010, 7:32:09 AM1/12/10
to mercu...@googlegroups.com
Hi Kevin,

Right now I dont have the script but you can visit
http://technologicaguru.blogspot.com/2008/01/connect-to-quality-center-using.html
there you can find the code.

Once this script is ready we can schedule it using windows scheduler
very easily just open windows scheduler and follow the instructions.

Kevin

unread,
Jan 12, 2010, 4:50:17 AM1/12/10
to QTP - HP Quick Test Professional - Automated Software Testing
Hi Mehmood,

If the system is locked, we cant send inputs from mouse or keyboard
right ???

suppose if a script needs some inputs from keyboard or mouse (For
Ex:Clicking on OK button) ,is it possible when the system is locked ??

> > - Show quoted text -- Hide quoted text -

Kevin

unread,
Jan 12, 2010, 4:51:31 AM1/12/10
to QTP - HP Quick Test Professional - Automated Software Testing
Also can we use framework if we use the scheduler to run a script ???

Thanks in Advance


Kevin

On Jan 12, 11:42 am, Kevin <gopis.ke...@gmail.com> wrote:

> > - Show quoted text -- Hide quoted text -

Prasad OVLN

unread,
Jan 16, 2010, 7:49:54 AM1/16/10
to mercu...@googlegroups.com
Change the following registry settings.. 
Goto following folder.. 
HKEY_LOCAL_MACHINE\SOFTWARE\Mercury Interactive\QuickTest Professional\MicTest 
Locate the key "SkipEnvironmentChecks" 
By Default the value will be "0" 
Change the value to "1" and restart the QTP. 
Now QTP will run with system locked.
Reply all
Reply to author
Forward
0 new messages