Skip to content

Commit 8c6140a

Browse files
author
Luiko Czub
committed
README format changed to rst, file with release notes added #15
1 parent f0c5617 commit 8c6140a

File tree

5 files changed

+183
-200
lines changed

5 files changed

+183
-200
lines changed

Diff for: CHANGES.rst

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
Changes in TestLink-API-Python-client Source Distribution
2+
=========================================================
3+
4+
TestLink-API-Python-client release notes v0.4.5 (Nov. 2013)
5+
-----------------------------------------------------------
6+
7+
All v0.4.0 API methods from TestlinkAPIClient are shifted to the new super class
8+
TestlinkAPIGeneric and could be used with the new optional argument handling and
9+
asked with whatArgs() for there arguments.
10+
11+
- getProject, createTestProject, createTestCase, createTestSuite, createTestPlan,
12+
createTestCase
13+
- createBuild, reportTCResult, uploadExecutionAttachment,
14+
- getTestProjectByName, getProjectTestPlans, getTotalsForTestPlan, getBuildsForTestPlan
15+
- getLatestBuildForTestPlan, getTestPlanByName
16+
- getTestSuitesForTestPlan, getTestSuiteByID, getTestSuitesForTestSuite,
17+
getFirstLevelTestSuitesForTestProject
18+
- getTestCasesForTestSuite, getTestCasesForTestPlan, getTestCaseIDByName, getFullPath
19+
- getLastExecutionResult, getTestCaseCustomFieldDesignValue, getTestCaseAttachments
20+
21+
Other API methods can be used with the new method
22+
23+
- callServerWithPosArgs(apiMethodame, [apiArgName=apiArgValue])
24+
25+
generic api class TestlinkAPIGeneric #7
26+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
27+
new class TestlinkAPIGeneric implements the Testlink API methods as generic PY methods
28+
29+
- all arguments of Teslink API are supported as optional arguments
30+
- often used (or mandatory) arguments can be configured as positional arguments
31+
- error handling for TestLink API error codes
32+
33+
class TestlinkAPIClient inherits now from TestlinkAPIGeneric the Testlink API methods
34+
35+
- configuration for positional arguments are consistent with v0.4.0
36+
- except getTestCaseIDByName (see ac6ccf5)
37+
38+
Attention - handling for optional arguments has been changed. Existing code,
39+
which uses TestlinkAPIClient, must be adapted. Changes between v0.4.5 and v.0.4.0
40+
are documented in `example/TestLinkExample.py`
41+
42+
public API method callServerWithPosArgs() #4
43+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
44+
Every implemented API method uses the new method callServerWithPosArgs() to call
45+
the server and check the response for error codes.
46+
47+
- If the response include an error code, a TLResponseError is raised
48+
49+
This method can although be used to call not yet implemented API methods.
50+
51+
helper method .whatArgs(apiMethodName) #8
52+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
53+
54+
The Teslink API Client can now be asked, what arguments a API method expects::
55+
56+
import testlink
57+
tlh = testlink.TestLinkHelper()
58+
tls = tlh.connect(testlink.TestlinkAPIClient)
59+
print tls.whatArgs('createTestPlan')
60+
createTestPlan(<testplanname>, <testprojectname>, [note=<note>], [active=<active>], [public=<public>], [devKey=<devKey>])
61+
create a test plan
62+
63+
or for a description of all implemented api method ::
64+
65+
import testlink
66+
tlh = testlink.TestLinkHelper()
67+
tls = tlh.connect(testlink.TestlinkAPIClient)
68+
for m in testlink.testlinkargs._apiMethodsArgs.keys():
69+
print tls.whatArgs(m), '\n'
70+
71+
other changes
72+
~~~~~~~~~~~~~
73+
74+
see `Milestone v0.4.5 <https://github.com/lczub/TestLink-API-Python-client/issues?milestone=3&state=closed>`_

Diff for: README.md

-189
This file was deleted.

Diff for: README.rst

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
TestLink API Python Client
2+
==========================
3+
4+
Copyright 2011-2013
5+
James Stock, Olivier Renault, Luiko Czub, TestLink-API-Python-client developers
6+
7+
License `Apache License 2.0`_
8+
9+
Introduction
10+
------------
11+
12+
TestLink-API-Python-client is a Python XML-RPC client for TestLink_.
13+
14+
Initially based on James Stock testlink-api-python-client R7 and Olivier
15+
Renault JinFeng_ idea - an interaction of TestLink_, `Robot Framework`_ and Jenkins_.
16+
17+
TestLink-API-Python-client delivers two main classes
18+
19+
- TestlinkAPIGeneric - Implements the TestLink API methods as generic PY methods
20+
with error handling
21+
- TestlinkAPIClient - Inherits from TestlinkAPIGeneric and defines service
22+
methods like "countProjects".
23+
24+
and the helper class
25+
26+
- TestLinkHelper - search connection parameter from environment variables and
27+
command line arguments
28+
29+
How to talk with TestLink in a python shell: ::
30+
31+
set TESTLINK_API_PYTHON_SERVER_URL=http://[YOURSERVER]/testlink/lib/api/xmlrpc/v1/xmlrpc.php
32+
set TESTLINK_API_PYTHON_DEVKEY=[Users devKey generated by TestLink]
33+
python
34+
>>> import testlink
35+
>>> tls = testlink.TestLinkHelper().connect(testlink.TestlinkAPIClient)
36+
>>> tls.countProjects()
37+
3
38+
>>> tls.getTestCase(None, testcaseexternalid='NPROAPI3-1')
39+
[{'full_tc_external_id': 'NPROAPI3-1', 'node_order': '0', 'is_open': '1', 'id': '2757', ...}]
40+
>>> print tls.whatArgs('createTestPlan')
41+
createTestPlan(<testplanname>, <testprojectname>, [note=<note>], [active=<active>], [public=<public>], [devKey=<devKey>])
42+
create a test plan
43+
44+
Installation
45+
------------
46+
47+
Install the latest stable release from PyPI using pip by running
48+
49+
pip install TestLink-API-Python-client
50+
51+
Directory Layout
52+
----------------
53+
54+
src/
55+
Source for TestLink API Python Client
56+
57+
doc/
58+
`Installation`_ and `Usage`_ documentation
59+
60+
examples/
61+
Examples, how to use `TestlinkAPIGeneric`_ and `TestlinkAPIClient`_.
62+
For (nearly all) implemented API methods you find an example, how to
63+
call it and how the response looks like.
64+
65+
tests/
66+
Unit Tests for TestLink API Python Client
67+
68+
Help
69+
----
70+
71+
Questions, Enhancements, Issues are welcome under `Issues`_
72+
73+
Take a look into `<CHANGES.rst>`_ for additional details, what have changed and
74+
how existing code can be adapted
75+
76+
77+
TestLink-API-Python-client developers
78+
-------------------------------------
79+
* `James Stock`_, `Olivier Renault`_, `lczub`_
80+
* `g4l4drim`_, `pade`_, `anton-matosov`_, `citizen-stig`_
81+
* anyone forgotten?
82+
83+
.. _Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0
84+
.. _TestLink: http://testlink.org
85+
.. _JinFeng: http://www.sqaopen.net/blog/en/?p=63
86+
.. _Robot Framework: http://code.google.com/p/robotframework
87+
.. _Jenkins: http://jenkins-ci.org
88+
.. _Installation: doc/install.rst
89+
.. _Usage: doc/usage.rst
90+
.. _TestlinkAPIGeneric: example/TestLinkExampleGenericApi.py
91+
.. _TestlinkAPIClient: example/TestLinkExample.py
92+
.. _Issues: https://github.com/lczub/TestLink-API-Python-client/issues
93+
.. _Olivier Renault: https://github.com/orenault/TestLink-API-Python-client
94+
.. _pade: https://github.com/pade/TestLink-API-Python-client
95+
.. _g4l4drim: https://github.com/g4l4drim/TestLink-API-Python-client
96+
.. _James Stock: https://code.google.com/p/testlink-api-python-client/
97+
.. _lczub: https://github.com/lczub/TestLink-API-Python-client
98+
.. _anton-matosov: https://github.com/anton-matosov/TestLink-API-Python-client
99+
.. _citizen-stig: https://github.com/citizen-stig/TestLink-API-Python-client

0 commit comments

Comments
 (0)