【问题标题】:Quality Center OTA API - TDFilter using PythonQuality Center OTA API - 使用 Python 的 TDFilter
【发布时间】:2012-08-17 06:53:02
【问题描述】:

我在 VB 中有以下代码用于 QC API“查找不在任何测试集中的测试”....我只是想知道如何在 Python 中编写相同的代码?特别是testSetFilder.Filter("CY_CYLE") = ">= 0"这一行

VB 代码

Public Sub ListUnusedTests()
'Get the list of tests that are not in any test set

Dim testSetF As TestSetFactory
Dim testF As TestFactory
Dim testSetFilter As TDFilter
Dim TestFilter As TDFilter
Dim aTest As Test
Dim testL As List

Set testSetF = tdc.TestSetFactory
Set testSetFilter = testSetF.Filter
' Exclude the default test set.
testSetFilter.Filter("CY_CYCLE") = ">= 0"

Set testF = tdc.TestFactory
Set TestFilter = testF.Filter
TestFilter.SetXFilter "TEST-TESTSET", False, testSetFilter.Text
Set testL = testF.NewList(TestFilter.Text)

Dim Item
For Each Item In testL
    Debug.Print Item.Name
Next Item
End Sub

谢谢

【问题讨论】:

  • 您在 Python 方面的进展如何?我只在 QC Workflows (VBScript) 本身中完成了 QA 自动化,而不是 Python。也许这篇文章会有所帮助:link
  • 我实际上已经解决了这个问题。我的简短回答是,我使用了 SetFilter()!如果您需要 QC 方面的帮助,请告诉我...谢谢,

标签: python hp-quality-center


【解决方案1】:

简短的回答是使用SetFilter()

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多