0
我在VB中爲QC API提供了以下代碼,用於「查找不在任何測試集中的測試」....我只是想知道如何將它寫入蟒蛇?特別是,該行testSetFilder.Filter("CY_CYLE") = ">= 0"
Quality Center OTA API - 使用Python的TDFilter
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。也許這篇文章將有助於:[鏈接](http://stackoverflow.com/q/2627419/589520) – Raceyman
我已經解決了這個問題。我的簡短回答是,我使用SetFilter()!讓我知道你是否想要QC的一些幫助...謝謝, – abarik