???????Python?????Excel????????????TestLink????????У????????£?
#coding=utf-8
import xlrd
from testlink import TestlinkAPIClient
#from __builtin__ import isinstance
TLURL = 'http://172.16.xx.xx/testlink/lib/api/xmlrpc/v1/xmlrpc.php'    #testlink url
DEVKey = '73e53369b9f4dc9a88a16e7620a5ce33'                            #admin user key
tlc = TestlinkAPIClient(TLURL?? DEVKey)
tlc.createTestCase
animbus = tlc.getTestProjectByName('animbus_test')       #Test_Project
data = xlrd.open_workbook('C:\Users\Administrator\Desktop\rally.xlsx')   #testcase excel
table1 = data.sheet_by_index(0)
apiSuiteID = '938'      #Test_Suite ID
apiSubSuites = tlc.getTestSuitesForTestSuite('938')
#for ID?? suite in apiSubSuites.items():
#    print ID?? suite['name']
suites = {suite['name']:suite for (ID?? suite) in apiSubSuites.items()}
suite_id=''
for i in range(0??table1.nrows):
row = table1.row_values(i)
if row[0] == '*':
if row[1] in suites.keys():
suite_id = suites[row[1]]['id']
print row[1]?? suite_id
else:
suite = tlc.createTestSuite('11'?? row[1]?? ''?? parentid='938')   # 11 for Test_Project id
suite_id = suite[0]['id']
print row[1]?? suite_id
else:
tlc.initStep(None?? None?? 1)  #????None???????????衢??????????????д?????None
newCase = tlc.createTestCase(row[1]?? suite_id?? animbus['id']??
'admin'?? '')
print newCase[0]['id']
???????
????TestLink?е????????????Excel????????????????????£????????????????????????TestLink?д????á?
?????????????Excel?е?Rally??????????????????????????????????