???Python?????Excel????????????TestLink
?????????????? ???????[ 2016/10/11 11:36:44 ] ?????????????????? ????????
???????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??????????????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11