QTP - Encrypt password in database connection

233 views
Skip to first unread message

mzraz...@gmail.com

unread,
Dec 22, 2009, 12:25:27 PM12/22/09
to mercu...@googlegroups.com
Hi,
Is there any way to encrypt database connection password in QTP?

Bibek Khatiwara

unread,
Dec 22, 2009, 11:38:52 PM12/22/09
to mercu...@googlegroups.com
Hi mzrazzaque,We can encrypt database connection password as follows:

DbPass ="test@1234"

encry_pd = Crypt.Encrypt(DbPass)

print "My new Encrypted Password is:"&encry_pd


On Tue, Dec 22, 2009 at 10:55 PM, <mzraz...@gmail.com> wrote:
Hi,
Is there any way to encrypt database connection password in QTP?

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



--
Regards,
Bibek

vishal nihaniwal

unread,
Dec 27, 2009, 7:47:50 AM12/27/09
to mercu...@googlegroups.com
pls try Crypt.Encrypt,
May  be it will help you and for complete explanation you can check qTP help
On Tue, Dec 22, 2009 at 10:55 PM, <mzraz...@gmail.com> wrote:
Hi,
Is there any way to encrypt database connection password in QTP?

--

mzraz...@gmail.com

unread,
Dec 27, 2009, 11:16:43 AM12/27/09
to mercu...@googlegroups.com
Thanks Bibek for the solution.
This will work fine.
But I don't want to display the password any place in my script since I use production DB login password in my script.
Thanks.

abhishek awale

unread,
Dec 28, 2009, 3:18:00 AM12/28/09
to mercu...@googlegroups.com
Hi mzrazzaque,

If you don't want to display the password at any place in script then you can set the username and password in some external property file (it may be txt or xml file) and then you can pass the required credentials to your test script and encrypt them in way that you are doing right now,

Please let me know if you need any help,

Regards,
Abhishek
Abhishek Awale
Quality Assurance Engineer,
Impetus Infotech India Pvt Ltd,
[ M ] +91 982 768 5004 [ E ] abhishe...@gmail.com, abhi_...@yahoo.co.in [ W ] www.impetus.com

Sriram Sri

unread,
Dec 30, 2009, 10:10:00 AM12/30/09
to mercu...@googlegroups.com
Hi,
If you want use password in an encrypted form then first you need to use password encoder tool that comes with the qtp. Using this tool u can generate an encrypted form of ur password and then copy that value into ur script.
Please let me know if an help needed
-Regards
Sriram

mzraz...@gmail.com

unread,
Dec 30, 2009, 10:51:33 AM12/30/09
to mercu...@googlegroups.com
Thanks for the info.
This works fine when your script needs a password to open you AUT. But this does not work when you include this within your query to open the database connection.

rattaiah choudary sunkara

unread,
Dec 31, 2009, 12:20:51 AM12/31/09
to mercu...@googlegroups.com
Hi
If you enter the data in the local or global sheet then right click on column select data then encrypt.. it works..
Regards
Rattaiah
Reply all
Reply to author
Forward
0 new messages