Update Run fields for runs created in Quality of Things(QoT)

This article provides a sample script to update run fields for runs created in QoT


‘************Global Variables*************
Dim myurl
Dim mydomain
Dim myproject
Dim myTDConnection
Dim myuser
Dim mypwd
Dim TheRunFilter
Sub Initialize()
myurl = “http://Server:8080/qcbin” ‘ToUpdate
mydomain = “mydomain” ‘ToUpdate
myproject = “myproject” ‘ToUpdate
myuser = “qot” ‘ToUpdate
mypwd = “pwd” ‘ToUpdate

TheRunFilter = “[Filter]”&_

End Sub

Sub LoginAlm()
Set myTDConnection = CreateObject(“tdapiole80.tdconnection”)
myTDConnection.initconnection myurl
myTDConnection.ConnectProjectEx mydomain, myproject, myuser, mypwd
End Sub

Sub logoutALm()
Set myTDConnection = Nothing
End Sub
Sub UpdateRuns(RunFieldToUpdate,RunValueToUpdate)
On Error Resume Next
Set runf = myTDConnection.RunFactory
Set runList = runf.Newlist(TheRunFilter)

LResponse = MsgBox(“Are you sure to want to update ” & runList.count & ” runs?”, 308, “Please confirm”)
If LResponse = vbYes Then
For Each Item In runList

End If

Set runList = Nothing
Set runf = Nothing
End Sub

Sub Main()
Call Initialize
Call LoginAlm
‘Example Call UpdateRuns(“RN_STATE”,”Finished”). it will update the run Field State with the value “Finished”
Call UpdateRuns(“”,””)
Call logoutALm
MsgBox “Update Done”
End Sub

Call main

READ  Getting error "/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory"

Leave a Comment