Skip Navigation LinksHome Page > Forums > RemoteLaunch Forums > RemoteLaunch Issues & Que... > Programmatically attach f...
I can include code below in a QTP test to check for a Quality Center connection and attach a file to the current executed run. Generally I write to a log during a test run and upload to Quality Center at the end of the run. I may want to use similar code to attach a screenshot or other data that is otherwise lost. Is there similar code I can use in a QTP script to attach data to the test run in SpiraTeam?
var_connection = QCUtil.IsConnectedIf var_connection = True Then If QCUtil.CurrentTestSetTest is Nothing then Exit Function Else Set CurrentRunObj = QCUtil.CurrentRun.Attachments Set AttcObj = CurrentRunObj.AddItem(Null) AttcObj.FileName = Log_File AttcObj.Type = 1 AttcObj.Post AttcObj.Refresh Set fso = CreateObject("Scripting.FileSystemObject") Set ResultFile = fso.GetFile(Log_File) ResultFile.Delete End If End If
Does anybody know how to fix the following problem with UFT 12.54 and ALM 12.50?
QCUtil.CurrentTestSetTest is Nothing
AND
QCUtil.CurrentRun.Attachments ----------------------------------> Err.Number = 424
'############################################################
Probably it needs to install an additional patch or addin
And if you have any questions, please email or call us at +1 (202) 558-6885