1.安装:pip install TestLink-API-Python-client
2.Python连接上TestLink:
1 import testlink 2 3 url = 'http://10.138.30.4:82/testlink/lib/api/xmlrpc/v1/xmlrpc.php' 4 key = '14115ec841a5c22a5b095158d2eb7' 5 6 tlc = testlink.TestlinkAPIClient(url, key) |
3.获取TestLink上的信息:
1 def get_information_test_project(): 2 print("Number of Projects in TestLink: %s " % tlc.countProjects()) 3 print("Number of Platforms (in TestPlans): %s " % tlc.countPlatforms()) 4 print("Number of Builds : %s " % tlc.countBuilds()) 5 print("Number of TestPlans : %s " % tlc.countTestPlans()) 6 print("Numbe |