我正在尝试使用 COM4J 获得 QC 要求覆盖率。我能够获得涵盖要求的测试用例列表,但我不知道如何获取测试用例 ID 和名称等,
IReqFactory reqFactory=(itdc.reqFactory()).queryInterface(IReqFactory.class);
IReq iReq = (reqFactory.item(17447)).queryInterface(IReq.class);
System.out.println("Coverage count"+iReq.getCoverList(true).count());
System.out.println(iReq.name()+"Requirement Name"+iReq.id()+"Requirement Id");
IList list1=iReq.getCoverList(true);
for(int i=1;i<=list1.count();i++){
//Com4jObject comobj = (Com4jObject)itr.next();
System.out.println("Covered Tests : "+list1.iterator());
}
我的输出是
Coverage count3
CAFE Core Functionality-750133Requirement Name17447Requirement Id
Covered Tests : 430171564
Covered Tests : 430171796
Covered Tests : 430172260
在这里我需要Testcase
id
andname
而不是Hashcode
. 提前致谢。