此功能应该在 HPQC 上添加一个新缺陷。但是,当 null 在 .addItem() 中时,它会给出“值不在预期范围内”。有谁知道可能是什么问题?
public static void addBug()
{
String qcUrl = "LINK TO HPQC";
String qcDomain = "DOMAIN";
String qcProject = "PROJECT";
String qcLoginName = "NAME";
String qcPassword = "PASS";
TDConnection connection = new TDConnection();
connection.InitConnectionEx(qcUrl);
connection.ConnectProjectEx(qcDomain, qcProject, qcLoginName, qcPassword);
BugFactory bugFactory = connection.BugFactory;
Bug bug = bugFactory.AddItem(null);
bug.Status = "New";
bug.Project = "QCIntegration";
bug.Summary = "Short description of the bug";
bug.DetectedBy = "Aaron Evans";
bug.AssignedTo = "Nobody";
bug.Priority = "Low";
bug.Post();
}