6import isystem.connect
as ic
7import test_getCoverageMetaInfo
as cvrg
14 connMgr = ic.ConnectionMgr()
15 connMgr.connect(ic.CConnectionConfig().instanceId(winidea_id))
17 ideCtrl = ic.CIDEController(connMgr)
18 xmlFilePath = os.path.join(ideCtrl.getPath(ic.CIDEController.WORKSPACE_DIR),
"cvrgExport.xml")
19 trdFilePath =
'example.trd'
21 covCtrl = ic.CCoverageController2(connMgr, trdFilePath,
"u")
22 cvrg._exportCoverageToXML(connMgr, trdFilePath, xmlFilePath)
23 covData = ic.CCoverageData2.createInstance(xmlFilePath,
True)
25 parseWarnings = covData.getParserWarnings()
29 print(
"There were some parsing errors/warnings discovered when parsing given document.")
31 root = covData.getRoot()
32 print(f
"Document `root` fetched, explore possible attributes:")
33 print(
"\tArea name:", root.getAreaName())
34 areaTypeStr = covCtrl.areaType2Str(root.getAreaType())
35 print(
"\tArea type:", root.getAreaType(), f
"({areaTypeStr})")
36 print(
"\tNumber of children areas:", root.getNumChildren())
41if __name__ ==
"__main__":