Skip to content

Instantly share code, notes, and snippets.

@bulkan
Created July 14, 2009 05:30
Show Gist options
  • Save bulkan/146732 to your computer and use it in GitHub Desktop.
Save bulkan/146732 to your computer and use it in GitHub Desktop.
import win32com, win32com.client
def unnededTests(qc):
reqFactory = qc.ReqFactory
reqFilter = reqFactory.Filter
# look at the makepy file generated
reqFilter.SetFilter("RQ_REQ_ID", ">=0")
# Set exclusive XFilter: Filter for items that
# match primary filter and do not match cross filter.
testFactory = qc.TestFactory
testFilter = testFactory.Filter
testFilter.SetXFilter("TEST-REQ", reqFilter.Text)
tests = testFactory.NewList(testFilter.Text)
for test in tests:
print test.ID
if __name__ == "__main__":
qc = win32com.client.Dispatch("TDApiOle80.TDConnection")
qc.InitConnection("http://qc:8080/qcbin")
qc.Login("user", "password")
qc.Connect("domain", "project")
unnededTests(qc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment