Add a new requirement using OTA

Dim i As Object

Dim td As New TDAPIOLELib.TDConnection

td.InitConnectionEx("<servername>:8080/qcbin") td.Login("<username>", "<pwd>") td.Connect("<DOMAIN>", "<project>")

Dim RFact As TDAPIOLELib.ReqFactory

Dim myreq As TDAPIOLELib.Req

RFact = td.ReqFactory

‘Add 5 new requirements to the root

For i = 1 To 5

myreq = RFact.AddItem(System.DBNull.Value)

myreq.Author = "<Enter Name>"

myreq.Name = "<Enter Requirement Name>" & i

myreq.Type = "Undefined" & i

myreq.Post()

Next

MsgBox("Added 5 new requirements!")

myreq = Nothing

RFact = Nothing

td.Logout()

td.ReleaseConnection()

td = Nothing

Leave a Comment