Python 对testlink的操作

本文介绍了如何使用Python与TestLink进行交互,包括Python安装TestLink API客户端和连接TestLink后的基本操作。
摘要由CSDN通过智能技术生成

摘要: 
TestLink 是基于web的测试用例管理系统,主要功能是测试用例的创建、管理和执行,并且还提供了一些简单的统计功能。

主要内容: 
testlink官网:http://www.testlink.org/

1. python 2.7 安装testlink命令:pip install TestLink-API-Python-client==0.4.7
2. Python连接上testlink可进行以下操作

#encoding=utf-8
import testlink, time
manual = 1  # manual
automation = 2  # automation
import ssl
# ssl._create_default_https_context = ssl._create_unverified_context
# connect to test link
# The API address of the test link server, only requires modification the IP section
url = "https://testlink部署的服务器IP/lib/api/xmlrpc/v1/xmlrpc.php"
key = "adjl8292uujsjiiwj1911gljdflsjgksljg1"  # test link personal key
my_testlink = testlink.TestLinkHelper(url, key).connect(testlink.TestlinkAPIClient)
# print("tlc information is: %s " % tlc)


class TestlinkProcess():

    #  get information of test link上, all of the following function are validated(except the last)
    def get_information_test_project(self):
            print("Number of Projects      in TestLink: %s " % my_testlink.countProjects())
            print("Number of Platforms  (in TestPlans): %s " % my_testlink.countPlatforms())
            print("Number of Builds                   : %s " % my_testlink.countBuilds())
            print("Number of TestPlans                : %s " % my_testlink.countTestPlans())
            # print("Number of TestSuites               : %s " % tlc.countTestSuites())
            # print("Number of TestCases (in TestSuites): 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值