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

Issue in AddCoverage to the Test

$
0
0

I am not what I am doing wrong...I have following code and sometime it work but most of the time its doesn't..

 

def _syncRequirements(self, test, reqId):
"""Synchronize the QC Test fields with the client test.

Parameters
test: OTA.COM.Test (the QC Test to be sync'd)
"""

print >>log, "updating requirement %s for %s" % (reqId, test.ID)

# Look for proper requirement....
try:
rFact = self.com.ReqFactory
req = rFact.Item(reqId)
print "Got req"

except Exception,ex:
raise ValueError("cannot find REQUIREMENT record '%s' in QC Requirements" % reqId)
return

# Get list of current requirements...
coverList = req.GetCoverageTestsByReqFilter("")
for coverageId in coverList:
if test.ID == coverageId.ID:
print "synctest: warning: requirement for %s in %s already exists" % (test.ID, reqId)
return
try:
if req:
req.AddCoverage(test.ID, -4)
#test.CoverRequirement(ReqList, 0))
#ReqList.AddTestToCoverage(test.ID)
time.sleep(1)

except Exception,ex:
print "ex : " + str(ex)
raise ValueError("synctest: Error in adding Coverage test %s to REQUIREMENT ID %s " % (test.ID, reqId))


req.Post

 

 

 

Thanks and Regards

Hemadri


Viewing all articles
Browse latest Browse all 5491

Trending Articles



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