Skip to content

python 3 support #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 17 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.tox
.idea
.project
.pydevproject
.settings/
Expand Down
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
language: python
python:
- "2.6"
- "2.7"
- "3.3"
- "3.4"

# command to install dependencies
install:
- "pip install pytest"
- "pip install unittest2"
- "pip install argparse"
- "pip install . "

# command to run tests
script: py.test test/utest-offline
26 changes: 17 additions & 9 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
Changes in TestLink-API-Python-client Source Distribution
=========================================================

TestLink-API-Python-client release notes v0.5.2 (Oct. 2014)
TestLink-API-Python-client release notes v0.6 (Nov. 2014)
---------------------------------------------------------
support for python 3 (3.3 and 3.4)
added tox, pytest and travis for tests and ci

**Note: tests are still unreliable as order of keywords is not maintained. Need to implement ordered dict to ensure all tests pass consistently**


TestLink-API-Python-client release notes v0.5.2 (Oct. 2014)
-----------------------------------------------------------
support for TestLink release 1.9.12

Expand All @@ -17,7 +25,7 @@ new TestlinkAPIGeneric and TestlinkAPIClient api method
examples see `<example/TestLinkExample.py>`_

implement 1.9.12 new api method - getTestCaseBugs #30
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

new TestlinkAPIGeneric and TestlinkAPIClient api method

Expand All @@ -29,11 +37,11 @@ new TestlinkAPIGeneric and TestlinkAPIClient api method
examples see `<example/TestLinkExample.py>`_

TestLink-API-Python-client release notes v0.5.1 (Aug. 2014)
------------------------------------------------------------
-----------------------------------------------------------
support for TestLink release 1.9.11

implement 1.9.11 api change - getLastExecutionResult #27
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

TestlinkAPIGeneric and TestlinkAPIClient api method getLastExecutionResult()
accepts now following additional optional arguments
Expand All @@ -47,7 +55,7 @@ example:
[{ ... , 'tcversion_id': '8929', ... , 'bugs': [{'bug_id': '4711'}], ... }]

implement 1.9.11 new api method - assignTestCaseExecutionTask #26
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

new TestlinkAPIGeneric and TestlinkAPIClient api method

Expand All @@ -59,7 +67,7 @@ examples see `<example/TestLinkExample.py>`_


TestLink-API-Python-client release notes v0.5.0 (Jul. 2014)
------------------------------------------------------------
-----------------------------------------------------------
support for TestLink release 1.9.10

new service methods - list keywords #25
Expand Down Expand Up @@ -99,7 +107,7 @@ accepts now following additional optional arguments (usable with TL >= 1.9.10)
- parameter getkeywords

implement 1.9.10 api change - reportTCResult #24
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

TestlinkAPIGeneric and TestlinkAPIClient api method reportTCResult()
accepts now following additional optional arguments (usable with TL >= 1.9.10)
Expand All @@ -108,7 +116,7 @@ accepts now following additional optional arguments (usable with TL >= 1.9.10)


implement missing 1.9.8 api method - CustomField #12
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

new TestlinkAPIGeneric and TestlinkAPIClient api methods

Expand Down Expand Up @@ -155,7 +163,7 @@ new TestlinkAPIGeneric and TestlinkAPIClient service method to return connection
- connectionInfo()

implement missing 1.9.8 api method - miscellaneous #14
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

new TestlinkAPIGeneric and TestlinkAPIClient api methods

Expand Down
28 changes: 14 additions & 14 deletions doc/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TestLink-API-Python-client Installation
Preconditions
-------------

Currently the combinations Python 2.6.6/2.7.8 and TestLink 1.9.12 are tested.
Currently the combinations Python 2.6.6/2.7.8/3.3/3.4 and TestLink 1.9.12 are tested.

- Other combination might work - feedback is welcome :-)

Expand Down Expand Up @@ -66,21 +66,21 @@ Check, if Python could talk with TestLink using the connection parameter
as init parameter::

python
>>> import testlink
>>> tls = testlink.TestlinkAPIClient(SERVER_URL, DEVKEY)
>>> tls.about()
' Testlink API Version: 1.0 initially ....'
or by defining the connection parameter as environment variables::
>>> import testlink
>>> tls = testlink.TestlinkAPIClient(SERVER_URL, DEVKEY)
>>> tls.about()
' Testlink API Version: 1.0 initially ....'

or by defining the connection parameter as environment variables::

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(testlink.TestlinkAPIClient)
>>> tls.about()
' Testlink API Version: 1.0 initially ....'
>>> import testlink
>>> tls = testlink.TestLinkHelper(testlink.TestlinkAPIClient)
>>> tls.about()
' Testlink API Version: 1.0 initially ....'

Changed SERVER_URL with TestLink 1.9.7
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -108,7 +108,7 @@ with connection parameter as environment variables
- TESTLINK_API_PYTHON_SERVER_URL and TESTLINK_API_PYTHON_DEVKEY



.. _PyPI: https://pypi.python.org/pypi
.. _pip: http://www.pip-installer.org
.. _SourceForge: http://sourceforge.net/projects/testlink-api-python-client/files/latest/download
Expand Down
4 changes: 2 additions & 2 deletions doc/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ or generate a description of all implemented API method: ::
tlh = testlink.TestLinkHelper()
tls = tlh.connect(testlink.TestlinkAPIClient)
for m in testlink.testlinkargs._apiMethodsArgs.keys():
print tls.whatArgs(m), '\n'
print(tls.whatArgs(m), '\n')

Copy test cases
---------------
Expand Down Expand Up @@ -100,7 +100,7 @@ alternative optional args, default reporter (user for devKey)
buildid='a build name', platformname='a platform name')

List keywords
-------------------
-------------

Using the api method - keywords for all test cases of one test suite

Expand Down
7 changes: 4 additions & 3 deletions example/Last7DaysTestCases.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# which have been created during the last 7 days


from __future__ import print_function
from testlink import TestlinkAPIClient, TestLinkHelper
import time

Expand All @@ -45,8 +46,8 @@ def iterTCasesfromTProject(api, TProjName, date1, date2):
currentTime = time.localtime()
oldTime = time.localtime(time.time() - 3600 * 24 * 7)

print '%s test cases created between %s and %s' % \
print('%s test cases created between %s and %s' % \
(projName, time.strftime('%Y-%m-%d', oldTime),
time.strftime('%Y-%m-%d', currentTime))
time.strftime('%Y-%m-%d', currentTime)))
for TCdata in iterTCasesfromTProject(tlapi, projName, oldTime, currentTime):
print ' %(name)s %(version)s %(creation_ts)s' % TCdata
print(' %(name)s %(version)s %(creation_ts)s' % TCdata)
Loading