Hi
Below is the code ...........
......................
The above is a sample Visual basic function that I need to integrate with QTP scripting so that when the defect(bug) is created it is also linked to the test that created it .
But since VB script is different .. how can I use this function ?
Thank you
Sonia
Below is the code ...........
Code:
Private Sub LinkBugToStep()
Dim linkF As LinkFactory
Dim link As link
Dim ilink As ILinkable
Dim bugF As BugFactory
Dim Bug As Bug
Dim stepsList As list
Dim runF As RunFactory
Dim run1 As Run
Set runF = tdc.RunFactory
Set run1 = runF.Item(71)
Dim stepF As StepFactory
Dim step1 As Step
Dim filter As TDFilter
Dim stepList As list
Set stepF = run1.StepFactory
Set filter = stepF.filter
Set stepsList = filter.NewList
Set step1 = stepsList.Item(1)
Set bugF = tdc.BugFactory
Set Bug = bugF.Item(26)
Set ilink = step1
Set linkF = ilink.BugLinkFactory
Set link = linkF.AddItem(Bug)
link.Post
' Disconnect tdc
End Sub
The above is a sample Visual basic function that I need to integrate with QTP scripting so that when the defect(bug) is created it is also linked to the test that created it .
But since VB script is different .. how can I use this function ?
Thank you
Sonia