Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5cbde2e
resolved missed merge conflict
anton-matosov Mar 11, 2013
cc3ada9
Merge tag 'rc4-conflict-solved'
Jul 16, 2013
29daf81
comments for changed server_url (TestLink 1.9.7)
Jul 16, 2013
b500cfb
Fix getTestCaseCustomFieldValue "version" parameter type
citizen-stig Sep 26, 2013
cd51c9c
Merge pull request #6 from citizen-stig/master
Oct 1, 2013
65a145e
TestLink API configuration added in Readme
Oct 5, 2013
f86d877
suggestion for a generic testlink api #7
Oct 6, 2013
6e65170
configuration for postional args added #7
Oct 11, 2013
98065f9
server call methods shifted to generic API #7
Oct 12, 2013
76c68a6
server call methods shifted to generic API #7
Oct 12, 2013
518ebf4
Conflicts:
Oct 13, 2013
46d65c0
server call methods shifted to generic API #7
Oct 15, 2013
a24177a
handling of TestLink response error code added #7
Oct 17, 2013
8bf1561
server call methods shifted to generic API #7
Oct 19, 2013
ef06c63
comments for generic api pre release v0.4.5 #7
Oct 20, 2013
c97b807
server call methods shifted to generic API #7
Oct 21, 2013
6857ee0
new decorator decoApiCallReplaceEmptyResponse #7
Oct 22, 2013
2de35be
server call methods shifted to generic API #7
Oct 23, 2013
41a2f5c
server call methods shifted to generic API #7
Oct 26, 2013
ac6ccf5
server call methods shifted to generic API #7
Oct 28, 2013
3c7b1a8
server call methods shifted to generic API #7
Oct 29, 2013
ba8093c
decorators use now functools.wraps - close #9
Oct 31, 2013
77184ef
new module testlinkargs and factory decoMakerApiCallWithArgs() #8
Nov 3, 2013
faa5035
decorator decoApiCallAddDevKey registers argument 'devKey' #8
Nov 4, 2013
cd3ed27
decorators separated into module testlinkdecorators #8
Nov 5, 2013
7ac681d
whatArgs(apiMethodName) implemented #8
Nov 7, 2013
eeb2081
cleanup of api method doc strings, closes #8
Nov 7, 2013
ba88160
update readme with v0.4.5 informations
Nov 8, 2013
cfcb3bb
replace absolute path with relelink
Nov 8, 2013
3fcf5e3
Merge pull request #1 from lczub/master
citizen-stig Nov 11, 2013
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
.settings/
build/
*.pyc
dist/
dist/
MANIFEST
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include MANIFEST.in LICENSE-2.0.txt README.md
recursive-include src *.py
recursive-include example *.py
recursive-include example *.png
recursive-include test *.py
79 changes: 69 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
TestLink API Python Client
==========================

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

License [Apache License 2.0]

Expand All @@ -11,11 +11,19 @@ Introduction

TestLink-API-Python-client is a Python XMLRPC client for the [TestLink API].

It's a brick of Olivier Renault [JinFeng] idea - an interaction of [TestLink],
[Robot Framework] and [Jenkins].

Initially based on the James Stock testlink-api-python-client R7.
Initially based on the 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.
* Allows the configuration of arguments for these API method as positional
or optional arguments.

* TestlinkAPIClient - Inherits Testlink API methods from the generic client
TestlinkAPIGeneric and defines service methods like "countProjects".
* Change the configuration for positional and optional arguments in a way,
that often used arguments are positional (consistent with v0.4.0).

Directory Layout
----------------
Expand All @@ -32,12 +40,19 @@ examples/
Installation
------------

### TestLink configuration
The testLink configuration (config.inc.php or custom_config.inc.php) must have enabled the api interface
* $tlCfg->api->enabled = TRUE;

The user specific devKey are created inside TestLink, see
* My Settings -> API interface - Personal API access key [Generate a new key]

### Install TestLinkAPI into a virtualenv environment

```
[PYTHON27]\Scripts\virtualenv [PYENV]\testlink
[PYENV]\testlink\Scripts\activate
python setup.py install
pip install TestLink-0.4.5-RC1.zip
```

### Run example with command line arguments
Expand All @@ -48,6 +63,12 @@ python example\TestLinkExample.py
--server_url http://[YOURSERVER]/testlink/lib/api/xmlrpc.php
--devKey [Users devKey generated by TestLink]
```
```
[PYENV]\testlink\Scripts\activate
python example\TestLinkExampleGenericApi.py
--server_url http://[YOURSERVER]/testlink/lib/api/xmlrpc.php
--devKey [Users devKey generated by TestLink]
```

### Run unittests with TestLink Server interaction

Expand All @@ -67,17 +88,52 @@ cd test\utest
python -m unittest testlinkhelpertest testlinkapi_offline_test
```

### Changes with TestLink 1.9.7

The SERVER_URL path has changed with TestLink 1.9.7.
Use http://[YOURSERVER]/testlink/lib/api/xmlrpc/v1/xmlrpc.php

Download
--------

see [downloads]
see [Releases]
* please read [v0.4.5 release notes](https://github.com/lczub/TestLink-API-Python-client/releases/tag/v0.4.5-RC1)
for changes between v0.4.0 and v0.4.5

Help
----

Questions, Enhancements, Issues are welcome under [Issues]

For (nearly all) implemented API methods you find in
[example/TestLinkExample.py](example/TestLinkExample.py)
an example, which although prints the reponse.

The Teslink API Client could be ask, what arguments a API method expects

```
import testlink
tlh = testlink.TestLinkHelper()
tls = tlh.connect(testlink.TestlinkAPIClient)
print tls.whatArgs('createTestPlan')
createTestPlan(<testplanname>, <testprojectname>, [note=<note>], [active=<active>], [public=<public>], [devKey=<devKey>])
create a test plan
```

or a description of all implemented API method could be generated

```
import testlink
tlh = testlink.TestLinkHelper()
tls = tlh.connect(testlink.TestlinkAPIClient)
for m in testlink.testlinkargs._apiMethodsArgs.keys():
print tls.whatArgs(m), '\n'
```

TestLink-API-Python-client developers
-------------------------------------
* [James Stock], [Olivier Renault]
* [g4l4drim], [pade], [lczub]
* [g4l4drim], [pade], [lczub], [anton-matosov], [citizen-stig]
* anyone forgotten?


Expand All @@ -87,9 +143,12 @@ TestLink-API-Python-client developers
[TestLink]: http://www.teamst.org/
[Robot Framework]: http://code.google.com/p/robotframework
[Jenkins]: http://jenkins-ci.org/
[downloads]: https://github.com/lczub/TestLink-API-Python-client/downloads
[Releases]: https://github.com/lczub/TestLink-API-Python-client/releases
[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
Binary file added example/PyGreat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading