1
1
TestLink API Python Client
2
2
==========================
3
3
4
- Copyright 2011-2012
5
- James Stock, Olivier Renault, TestLink-API-Python-client developers
4
+ Copyright 2011-2013
5
+ James Stock, Olivier Renault, Luiko Czub, TestLink-API-Python-client developers
6
6
7
7
License [ Apache License 2.0]
8
8
@@ -11,11 +11,19 @@ Introduction
11
11
12
12
TestLink-API-Python-client is a Python XMLRPC client for the [ TestLink API] .
13
13
14
- It's a brick of Olivier Renault [ JinFeng] idea - an interaction of [ TestLink] ,
15
- [ Robot Framework] and [ Jenkins] .
16
-
17
- Initially based on the James Stock testlink-api-python-client R7.
14
+ Initially based on the James Stock testlink-api-python-client R7 and Olivier
15
+ Renault [ JinFeng] idea - an interaction of [ TestLink] , [ Robot Framework] and [ Jenkins] .
18
16
17
+ TestLink-API-Python-client delivers two main classes
18
+ * TestlinkAPIGeneric - Implements the Testlink API methods as generic PY
19
+ methods with error handling.
20
+ * Allows the configuration of arguments for these API method as positional
21
+ or optional arguments.
22
+
23
+ * TestlinkAPIClient - Inherits Testlink API methods from the generic client
24
+ TestlinkAPIGeneric and defines service methods like "countProjects".
25
+ * Change the configuration for positional and optional arguments in a way,
26
+ that often used arguments are positional (consistent with v0.4.0).
19
27
20
28
Directory Layout
21
29
----------------
@@ -32,12 +40,19 @@ examples/
32
40
Installation
33
41
------------
34
42
43
+ ### TestLink configuration
44
+ The testLink configuration (config.inc.php or custom_config.inc.php) must have enabled the api interface
45
+ * $tlCfg->api->enabled = TRUE;
46
+
47
+ The user specific devKey are created inside TestLink, see
48
+ * My Settings -> API interface - Personal API access key [ Generate a new key]
49
+
35
50
### Install TestLinkAPI into a virtualenv environment
36
51
37
52
```
38
53
[PYTHON27]\Scripts\virtualenv [PYENV]\testlink
39
54
[PYENV]\testlink\Scripts\activate
40
- python setup.py install
55
+ pip install TestLink-0.4.5-RC1.zip
41
56
```
42
57
43
58
### Run example with command line arguments
@@ -48,6 +63,12 @@ python example\TestLinkExample.py
48
63
--server_url http://[YOURSERVER]/testlink/lib/api/xmlrpc.php
49
64
--devKey [Users devKey generated by TestLink]
50
65
```
66
+ ```
67
+ [PYENV]\testlink\Scripts\activate
68
+ python example\TestLinkExampleGenericApi.py
69
+ --server_url http://[YOURSERVER]/testlink/lib/api/xmlrpc.php
70
+ --devKey [Users devKey generated by TestLink]
71
+ ```
51
72
52
73
### Run unittests with TestLink Server interaction
53
74
@@ -75,13 +96,44 @@ Use http://[YOURSERVER]/testlink/lib/api/xmlrpc/v1/xmlrpc.php
75
96
Download
76
97
--------
77
98
78
- see [ downloads]
99
+ see [ Releases]
100
+ * please read [ v0.4.5 release notes] ( https://github.com/lczub/TestLink-API-Python-client/releases/tag/v0.4.5-RC1 )
101
+ for changes between v0.4.0 and v0.4.5
102
+
103
+ Help
104
+ ----
105
+
106
+ Questions, Enhancements, Issues are welcome under [ Issues]
79
107
108
+ For (nearly all) implemented API methods you find in
109
+ [ example/TestLinkExample.py] ( example/TestLinkExample.py )
110
+ an example, which although prints the reponse.
111
+
112
+ The Teslink API Client could be ask, what arguments a API method expects
113
+
114
+ ```
115
+ import testlink
116
+ tlh = testlink.TestLinkHelper()
117
+ tls = tlh.connect(testlink.TestlinkAPIClient)
118
+ print tls.whatArgs('createTestPlan')
119
+ createTestPlan(<testplanname>, <testprojectname>, [note=<note>], [active=<active>], [public=<public>], [devKey=<devKey>])
120
+ create a test plan
121
+ ```
122
+
123
+ or a description of all implemented API method could be generated
124
+
125
+ ```
126
+ import testlink
127
+ tlh = testlink.TestLinkHelper()
128
+ tls = tlh.connect(testlink.TestlinkAPIClient)
129
+ for m in testlink.testlinkargs._apiMethodsArgs.keys():
130
+ print tls.whatArgs(m), '\n'
131
+ ```
80
132
81
133
TestLink-API-Python-client developers
82
134
-------------------------------------
83
135
* [ James Stock] , [ Olivier Renault]
84
- * [ g4l4drim] , [ pade] , [ lczub] , [ anton-matosov]
136
+ * [ g4l4drim] , [ pade] , [ lczub] , [ anton-matosov] , [ citizen-stig ]
85
137
* anyone forgotten?
86
138
87
139
@@ -91,10 +143,12 @@ TestLink-API-Python-client developers
91
143
[ TestLink ] : http://www.teamst.org/
92
144
[ Robot Framework ] : http://code.google.com/p/robotframework
93
145
[ Jenkins ] : http://jenkins-ci.org/
94
- [ downloads ] : https://github.com/lczub/TestLink-API-Python-client/downloads
146
+ [ Releases ] : https://github.com/lczub/TestLink-API-Python-client/releases
147
+ [ Issues ] : https://github.com/lczub/TestLink-API-Python-client/issues
95
148
[ Olivier Renault ] : https://github.com/orenault/TestLink-API-Python-client
96
149
[ pade ] : https://github.com/pade/TestLink-API-Python-client
97
150
[ g4l4drim ] : https://github.com/g4l4drim/TestLink-API-Python-client
98
151
[ James Stock ] : https://code.google.com/p/testlink-api-python-client/
99
152
[ lczub ] : https://github.com/lczub/TestLink-API-Python-client
100
- [ anton-matosov ] : https://github.com/anton-matosov/TestLink-API-Python-client.git
153
+ [ anton-matosov ] : https://github.com/anton-matosov/TestLink-API-Python-client
154
+ [ citizen-stig ] : https://github.com/citizen-stig/TestLink-API-Python-client
0 commit comments