Quantcast
Channel: Quality Center / ALM Practitioners Forum topics
Viewing all articles
Browse latest Browse all 5491

Extract number of Testcases linked to a Defect in excel sheet using excel Macro

$
0
0

I have used following code to fetch Bug details in excel sheet using  macro, Now i want to fetch number of test cases (only count) linked to specif defect.

Set BugFilter = BugFactory.Filter
'BugFilter.Filter("BG_DETECTED_IN_RCYC") = DefectDetectedInCycle
BugFilter.Filter("BG_DETECTED_IN_RCYC") = LoginForm.DefectSuiteName.Value
Set BugList1 = BugFilter.NewList


'You can choose any other value that you want as per your need and requirements.


Sheet4.Cells(1, 1).Value = "Bug Id"

Sheet4.Cells(1, 2).Value = "Severity"

Sheet4.Cells(1, 3).Value = "Detected By"

Sheet4.Cells(1, 4).Value = "Priority"

Sheet4.Cells(1, 5).Value = "Status"

Sheet4.Cells(1, 6).Value = "Assigned To"
Sheet4.Cells(1, 7).Value = "Defect Date"
Sheet4.Cells(1, 8).Value = "Nmber of TC Linked"


' Retrieve the values of each bug in excel sheet

Dim Bug, Row
Row = 2
For Each Bug In BugList1
Sheet4.Cells(Row, 1).Value = Bug.Field("BG_BUG_ID")
Sheet4.Cells(Row, 2).Value = Bug.Field("BG_SEVERITY")

Sheet4.Cells(Row, 3).Value = Bug.DetectedBy

Sheet4.Cells(Row, 4).Value = Bug.Priority

Sheet4.Cells(Row, 5).Value = Bug.Status

Sheet4.Cells(Row, 6).Value = Bug.AssignedTo

Sheet4.Cells(Row, 7).Value = Bug.Field("BG_DETECTION_DATE")
Sheet4.Cells(Row, 8).Value = BugList1.Count
Row = Row + 1

 

Please help me to fetch number of defects linked to specific defect based on the above details


Viewing all articles
Browse latest Browse all 5491

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>