我正在尝试访问 ALM V11 (QC) 测试脚本详细信息,例如使用 Java 的特定项目的通过/未运行,但我得到空值。有人可以帮我吗?
我得到的错误:
java.lang.NullPointerException
at com.testpack.HPTest2.main(HPTest2.java:53)
我用来连接的代码
ITDConnection itd=ClassFactory.createTDConnection();
System.out.println("Test1.1:"+ itd.connected());
itd.initConnectionEx(url);
System.out.println("Test1:"+ itd.connected());
itd.connectProjectEx(domain,project,username,password);
ITestFactory testFactory;
//ITSTest2 testFactory;
ITDFilter2 filterF;
IList executinList;
testFactory=(itd.testFactory()).queryInterface(ITestFactory.class);
//testFactory=(ITestFactory)itd.testFactory().queryInterface(ITestFactory.class);
filterF=testFactory.fields().queryInterface(ITDFilter2.class);
String query="\"Passed\"";
filterF.filter("TC_STATUS",query);
executinList=filterF.newList();
我正在尝试比较我拥有的 VBScript
Set tdc = CreateObject("tdapiole80.tdconnection")
tdc.InitConnection serverName, domainName
tdc.ConnectProject projectName, projUserName, projPassword
'Get the test factory filter
Set TestSetFact = tdc.TSTestFactory
'TestSetFact.AddItem()
Set TestSetFilter = TestSetFact.Filter
stemp = ApplicationName
appsplit = Split(ApplicationName, "or")
irowtemp = 18
'----------------------------------------------------
'--------------------------------
For iLoop = 0 To UBound(appsplit)
TestSetFilter.Filter("TS_USER_06") = appsplit(iLoop)
If initiativeName <> "" Then
TestSetFilter.Filter("TS_USER_04") = initiativeName
End If
TestSetFilter.Filter("TC_STATUS") = "Passed"
Sheet1.Cells(irowtemp, 2).Value = Trim(appsplit(iLoop))