forked from g4l4drim/TestLink-API-Python-client
-
Notifications
You must be signed in to change notification settings - Fork 63
/
setup.py
88 lines (71 loc) · 3.29 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#! /usr/bin/python
# -*- coding: UTF-8 -*-
# Copyright 2012-2019 Luiko Czub, TestLink-API-Python-client developers
#
# Licensed under Apache 2.0
#
from os.path import join, dirname
from distutils.core import setup
with open(join(dirname(__file__), 'src', 'testlink', 'version.py')) as fpv:
version_code = compile(fpv.read(), 'version.py', 'exec')
exec(version_code)
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Software Development :: Testing',
'Topic :: Software Development :: Libraries :: Python Modules'
]
DESCRIPTION = """
TestLink-API-Python-client is a Python XML-RPC client for TestLink_.
Initially based on James Stock testlink-api-python-client R7 and Olivier
Renault JinFeng_ idea - an interaction of TestLink_, `Robot Framework`_ and Jenkins_.
TestLink-API-Python-client delivers two main classes
- TestlinkAPIGeneric - Implements the TestLink API methods as generic PY methods
with error handling
- TestlinkAPIClient - Inherits from TestlinkAPIGeneric and defines service
methods like "copyTCnewVersion".
and the helper class
- TestLinkHelper - search connection parameter from environment variables and
command line arguments
How to talk with TestLink in a python shell and copy a test case: ::
set TESTLINK_API_PYTHON_SERVER_URL=http://[YOURSERVER]/testlink/lib/api/xmlrpc/v1/xmlrpc.php
set TESTLINK_API_PYTHON_DEVKEY=[Users devKey generated by TestLink]
python
>>> import testlink
>>> tls = testlink.TestLinkHelper().connect(testlink.TestlinkAPIClient)
>>> tls.countProjects()
3
>>> tc_info = tls.getTestCase(None, testcaseexternalid='NPROAPI-3')
[{'full_tc_external_id': 'NPROAPI-3', ..., 'id': '5440', 'version': '2',
'testsuite_id': '5415', 'tc_external_id': '3','testcase_id': '5425', ...}]
>>> tls.copyTCnewTestCase(tc_info[0]['testcase_id'], testsuiteid=newSuiteID,
testcasename='a new test case name')
>>> print tls.whatArgs('createTestPlan')
createTestPlan(<testplanname>, <testprojectname>, [note=<note>], [active=<active>],
[public=<public>], [devKey=<devKey>])
create a test plan
More information about this library can be found on the Wiki_
.. _TestLink: http://testlink.org
.. _JinFeng: http://www.sqaopen.net/blog/en/?p=63
.. _Robot Framework: http://code.google.com/p/robotframework
.. _Jenkins: http://jenkins-ci.org
.. _Wiki: https://github.com/lczub/TestLink-API-Python-client/wiki
"""[1:-1]
setup(name='TestLink-API-Python-client',
version=VERSION,
description='Python XML-RPC client for TestLink %s' % TL_RELEASE,
long_description = DESCRIPTION,
author='James Stock, Olivier Renault, Luiko Czub, TestLink-API-Python-client developers',
author_email='[email protected], [email protected]',
url='https://github.com/lczub/TestLink-API-Python-client',
license = 'Apache 2.0',
package_dir = {'': 'src'},
packages = ['testlink'],
classifiers = CLASSIFIERS,
platforms = 'any',
keywords = ['testing', 'testlink', 'xml-rpc', 'testautomation']
)