Code to get a list of all the details for all the defects in QC Defects Module
''Complete path of the file where the info from QC needs to be written
sQCLogFilePath = "C:\Automation\Defects_List.csv"
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFile = oFSO.CreateTextFile(sQCLogFilePath)
''Getting the QC Connection Object. Refer earlier post about the implementation of this function
Set oALMConnObj = funcGetALMConnectionObj (sQCServer, sQCUsername, sQCPassword, sQCDomain, sQCProject)
''Getting the Bug Factory object
Set oBugFactory = oALMConnObj.BugFactory
Set oBugList = oBugFactory.NewList("")
oFile.WriteLine("Defect ID" & "," & "Summary")
For Each oBug In oBugList
oFile.WriteLine(oBug.ID & "," & oBug.Summary)
''We can add other fields as: Bug.Status, Bug.Priority, Bug.AssignedTo
Next
Set oFile = Nothing
Set oFSO = Nothing
Set oBugFactory = Nothing
Set oALMConnObj = Nothing
''Complete path of the file where the info from QC needs to be written
sQCLogFilePath = "C:\Automation\Defects_List.csv"
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFile = oFSO.CreateTextFile(sQCLogFilePath)
''Getting the QC Connection Object. Refer earlier post about the implementation of this function
Set oALMConnObj = funcGetALMConnectionObj (sQCServer, sQCUsername, sQCPassword, sQCDomain, sQCProject)
''Getting the Bug Factory object
Set oBugFactory = oALMConnObj.BugFactory
Set oBugList = oBugFactory.NewList("")
oFile.WriteLine("Defect ID" & "," & "Summary")
For Each oBug In oBugList
oFile.WriteLine(oBug.ID & "," & oBug.Summary)
''We can add other fields as: Bug.Status, Bug.Priority, Bug.AssignedTo
Next
Set oFile = Nothing
Set oFSO = Nothing
Set oBugFactory = Nothing
Set oALMConnObj = Nothing
No comments:
Post a Comment