lczub / TestLink-API-Python-client

A Python client to use the TestLink API
104 stars 63 forks source link

TestLink API Python Client

Copyright 2011-2022 James Stock, Olivier Renault, Luiko Czub, TestLink-API-Python-client developers

License Apache License 2.0_

.. image:: https://travis-ci.com/lczub/TestLink-API-Python-client.svg?branch=master :target: https://travis-ci.com/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

and the helper class

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=]) 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 (EN) / Usage (FR)_ 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

.. _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 (EN): doc/usage.rst .. _Usage (FR): doc/fr_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 .. _Brian-Williams: https://github.com/Brian-Williams/TestLink-API-Python-client .. _alexei-drozdov: https://github.com/alexei-drozdov/TestLink-API-Python-client .. _janLo: https://github.com/janLo/TestLink-API-Python-client .. _heuj: https://github.com/heuj/TestLink-API-Python-client .. _elapfra: https://github.com/elapfra/TestLink-API-Python-client .. _Mikycid: https://github.com/Mikycid/TestLink-API-Python-client