Created
July 14, 2009 05:30
-
-
Save bulkan/146732 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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