TestLink-API-Python-client
TestLink-API-Python-client copied to clipboard
A Python client to use the TestLink API
TestLink API Python Client
Copyright 2011-2017 James Stock, Olivier Renault, Luiko Czub, TestLink-API-Python-client developers
License Apache License 2.0
_
.. image:: https://travis-ci.org/lczub/TestLink-API-Python-client.svg?branch=master :target: https://travis-ci.org/lczub/TestLink-API-Python-client
.. contents:: :local:
Introduction
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(, , [note= ], [active= ], [public= ], [devKey=<devKey>]) create a test plan
Installation
Install the latest stable release from PyPI using pip by running
pip install TestLink-API-Python-client
Directory Layout
src/ Source for TestLink API Python Client
doc/
Installation
_ and Usage
_ documentation
examples/
Examples, how to use TestlinkAPIGeneric
_ and TestlinkAPIClient
_.
For (nearly all) implemented API methods you find an example, how to
call it and how the response looks like.
tests/ Unit Tests for TestLink API Python Client
tox.ini
_
Configuration for multi Python version testing via Tox
_
Help
Questions, Enhancements, Issues are welcome under Issues
_
Take a look into <CHANGES.rst>
_ for additional details, what have changed and
how existing code can be adapted
TestLink-API-Python-client developers
-
James Stock
,Olivier Renault
,lczub
,manojklm
(PY3) -
g4l4drim
,pade
,anton-matosov
,citizen-stig
,charz
,Maberi
,Brian-Williams
_ - anyone forgotten?
.. _Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0 .. _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 .. _Installation: doc/install.rst .. _Usage: doc/usage.rst .. _TestlinkAPIGeneric: example/TestLinkExampleGenericApi.py .. _TestlinkAPIClient: example/TestLinkExample.py .. _tox.ini: tox.ini .. _Tox: http://tox.readthedocs.org/en/latest/ .. _Issues: https://github.com/lczub/TestLink-API-Python-client/issues .. _Olivier Renault: https://github.com/orenault/TestLink-API-Python-client .. _pade: https://github.com/pade/TestLink-API-Python-client .. _g4l4drim: https://github.com/g4l4drim/TestLink-API-Python-client .. _James Stock: https://code.google.com/p/testlink-api-python-client/ .. _lczub: https://github.com/lczub/TestLink-API-Python-client .. _anton-matosov: https://github.com/anton-matosov/TestLink-API-Python-client .. _citizen-stig: https://github.com/citizen-stig/TestLink-API-Python-client .. _charz: https://github.com/charz/TestLink-API-Python-client.git .. _manojklm: https://github.com/manojklm/TestLink-API-Python-client .. _Maberi: https://github.com/Maberi/TestLink-API-Python-client.git