【问题标题】:HP ALM OTA-API: How to update a test in testlab knowing the id?HP ALM OTA-API:如何在知道 id 的情况下更新 testlab 中的测试?
【发布时间】:2014-11-26 16:16:24
【问题描述】:

我知道测试集中的测试 id 并想更新您的状态,知道如何使用 API OTA 来完成吗?

编辑:
谢谢,但不幸的是,目前的答案对我不起作用。 我把例子(java):

ITestSetFactory sTestFactory = (itdc.testSetFactory()).queryInterface(ITestSetFactory.class);
ITDFilter filterF=sTestFactory.filter().queryInterface(ITDFilter.class);
filterF.filter("TC_TEST_ID","531729");
System.out.println(filterF.newList().count());

错误:

线程“主”com4j.ComException 中的异常:800403ea(未知错误):无法获取测试集值:.\invoke.cpp:517 在 com4j.Wrapper.invoke(Wrapper.java:166) 在 com.sun.proxy.$Proxy13.newList(未知来源) 在 TestQC.main(TestQC.java:64)

有什么建议吗?

【问题讨论】:

  • 你应该提供一些额外的信息,比如你使用的语言或者你到目前为止尝试过的东西(一些代码和失败的地方)。
  • 抱歉回复延迟。它在 java 中。非常感谢!

标签: testing ota alm


【解决方案1】:

发生错误是因为您使用了 TestSetFactory 而不是 TSTestFactory。您应该使用itdc.tsTestFactory(),因为它是您要操作的 TSTest 对象(又名测试实例),而不是 TestSet 对象。最简单的方法是获取 TDConnection 对象的 TSTestFactory,并使用过滤器获取 TSTest 对象,然后设置其状态。 Ruby 中的示例代码:

ts_test_factory = tdc.TSTestFactory
filter = ts_test_factory.Filter
filter["TC_TEST_ID"] = "123" # test id from test plan
found_test_instances = filter.NewList
test_instance = found_test_instances.Item(1) # be careful if the test occurs in many test sets
test_instance.Status = "Passed"
test_instance.Post

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-07-16
    • 2021-06-29
    • 1970-01-01
    • 2015-10-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多