UFT test when run from ALM when checked out the run status not saving in test grid.
Question ID: 107401
0
0

We have a user that likes to run their automated (UFT) tests in HP ALM while they are in a checked out status. The problem with this is that when they run the tests in a checked out status the run result for that test is not reflected in the test lab execution grid. When you run tests that are checked out the run is saved as a "Draft Run" so the run status does not show up in the test lab grid. Is there anyway to change this behavior in workflow so that the test run is not saved as a draft run when it is run in a checked out status??

Marked as spam
Posted by (Questions: 100, Answers: 4)
Asked on January 25, 2017 5:02 pm
378 views
Answers (1)
0
Private answer

You cannot change it via workflow during the run, but you can change it in UFT during the run for that test. I have posted some UFT code below, have the user add the UFT code to the beginning of the scripts and it will check to see if the test is run from ALM, if it is it will set the draft run status to N so that the run shows up.

'Written by Joshua Yates Orasi Software 1/17/17
Dim CurrentTSTest
if qcutil.IsConnected then
Reporter.ReportEvent micPass,''Connected to QC'', ''Connected to Quality Center Server: '' & qcutil.QCConnection.ServerName & vbcrlf & _
''Project : '' & qcutil.QCConnection.ProjectName & vbcrlf & '' Domain : '' & qcutil.QCConnection.DomainName
Set CurrentTSTest = qcutil.CurrentTestSetTest
if CurrentTSTest is Nothing then
Reporter.ReportEvent micFail,''IsExecutedFromQC'', ''QTP is connected to quality center server. But the test is **not** executed from a Testlab in QC''
IsExecutedFromQC = FALSE
else
Reporter.ReportEvent micPass,''IsExecutedFromQC'', ''The test is executed from a Testlab in QC''
IsExecutedFromQC = TRUE
'set draft run to N so test result will show up if ran while checked out
QCUtil.CurrentRun.Field(''RN_DRAFT'') = ''N''
Reporter.ReportEvent micPass,''Set Draft Run Value'', ''Test Draft Run status changed to N''
end if
End if

Marked as spam
Posted by (Questions: 0, Answers: 364)
Answered on January 25, 2017 5:02 pm
EyeOnTesting

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

X
Scroll to Top