Get the username of the logged in user that initiated a test run
Question ID: 104042
0
0

Is there a way to get the username of the ‘logged in’ user that initiated a test run of a QTP script from QC?

Marked as spam
Posted by (Questions: 36, Answers: 3)
Asked on February 8, 2010 8:24 pm
136 views
Answers (2)
1
Private answer

Summary
Get the username of the logged in user that initiated a test run

Solution
Use the QCUtil Object to get info about the QCConnection from inside the qtp script.

Example:

set qcc = QCUtil.QCConnection  
msgbox qcc.UserName
Marked as spam
Posted by (Questions: 6, Answers: 5)
Answered on February 8, 2010 10:00 pm
1
Private answer

Are you executing the QTP script on a different host than where the user is logged in to QC from?

With QTP, you can just use the built in Environment(''UserName'') to get the user of the person logged into the box that QTP is running on. If the user is executing the QTP script on a remote host, you'll have to use Bulldawg's answer.

Marked as spam
Posted by (Questions: 17, Answers: 807)
Answered on April 1, 2010 8:23 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top