Skip to content

Commit 40aeb9e

Browse files
author
Luiko Czub
committed
prepare release v0.6.0
1 parent 2b46d8b commit 40aeb9e

File tree

7 files changed

+85
-24
lines changed

7 files changed

+85
-24
lines changed

Diff for: CHANGES.rst

+29-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,41 @@ TestLink-API-Python-client release notes v0.6.0 - under develop
66

77
support for TestLink release 1.9.12 and py26, py27, py33 and py34
88

9+
python 3 suppport - pull requests #33 #37
10+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11+
912
Integrates `manojklm <https://github.com/manojklm/TestLink-API-Python-client>`_
10-
pull request #33 and #37
13+
pull requests
14+
`#33 <https://github.com/lczub/TestLink-API-Python-client/pull/33>`_
15+
and `#37 <https://github.com/lczub/TestLink-API-Python-client/pull/37>`_
1116

1217
- add source and unittest support for py33 and py34
1318
- extend py26 support for unittest2
14-
- add *.travis.yml* configuration for `Travis CI <https://travis-ci.org/manojklm/TestLink-API-Python-client>`_
19+
- add *.travis.yml* configuration for `Travis CI <http://docs.travis-ci.com/>`_
1520
- add *tox.ini* configuration for `Tox <http://tox.readthedocs.org>`_
1621

22+
Track now TestLink-API-Python-client build results on Travis CI - see
23+
https://travis-ci.org/lczub/TestLink-API-Python-client
24+
25+
extend upload attachments - handling file path #40
26+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
27+
28+
uploading attachments excepts now also a file path as parameter.
29+
30+
```
31+
# still supported 0.5.2 behavior - file descriptor
32+
a_file_obj=open(A_VALID_FILE_PATH)
33+
newAttachment = myTestLink.uploadExecutionAttachment(a_file_obj, A_Result_ID,
34+
'Attachment Title', 'Attachment Description')
35+
```
36+
37+
```
38+
# new supported 0.6.0 behaviour - file path
39+
newAttachment = myTestLink.uploadExecutionAttachment(A_VALID_FILE_PATH, A_Result_ID,
40+
'Attachment Title', 'Attachment Description')
41+
```
42+
43+
1744
TestLink-API-Python-client release notes v0.5.2 (Oct. 2014)
1845
-----------------------------------------------------------
1946
support for TestLink release 1.9.12

Diff for: MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include MANIFEST.in LICENSE-2.0.txt README.rst CHANGES.rst
1+
include MANIFEST.in LICENSE-2.0.txt README.rst CHANGES.rst tox.ini
22
recursive-include src *.py
33
recursive-include example *.py
44
recursive-include example *.png

Diff for: README.rst

+12
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ James Stock, Olivier Renault, Luiko Czub, TestLink-API-Python-client developers
66

77
License `Apache License 2.0`_
88

9+
.. image:: https://travis-ci.org/lczub/TestLink-API-Python-client.svg?branch=master
10+
:target: https://travis-ci.org/lczub/TestLink-API-Python-client
11+
12+
.. contents::
13+
:local:
14+
915
Introduction
1016
------------
1117

@@ -69,6 +75,10 @@ examples/
6975

7076
tests/
7177
Unit Tests for TestLink API Python Client
78+
79+
`tox.ini`_
80+
Configuration for multi Python version testing via `Tox`_
81+
7282

7383
Help
7484
----
@@ -94,6 +104,8 @@ TestLink-API-Python-client developers
94104
.. _Usage: doc/usage.rst
95105
.. _TestlinkAPIGeneric: example/TestLinkExampleGenericApi.py
96106
.. _TestlinkAPIClient: example/TestLinkExample.py
107+
.. _tox.ini: tox.ini
108+
.. _Tox: http://tox.readthedocs.org/en/latest/
97109
.. _Issues: https://github.com/lczub/TestLink-API-Python-client/issues
98110
.. _Olivier Renault: https://github.com/orenault/TestLink-API-Python-client
99111
.. _pade: https://github.com/pade/TestLink-API-Python-client

Diff for: doc/install.rst

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
TestLink-API-Python-client Installation
22
=======================================
33

4+
.. contents::
5+
:local:
6+
47
Preconditions
58
-------------
69

7-
Currently the combinations Python 2.6.6/2.7.8/3.3/3.4 and TestLink 1.9.12 are tested.
10+
Currently the combinations Python 2.6.9/2.7.9/3.3.5/3.4.2 and TestLink 1.9.12 are tested.
811

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

1114
To use TestLink-API-Python-client under Py26, the module **argparse** must be
12-
installed additionally (Py27 already includes this)::
15+
installed additionally (Py27, Py33 and Py34 already includes this)::
1316

1417
pip install argparse
1518

Diff for: doc/usage.rst

+29-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
TestLink-API-Python-client Usage
22
================================
33

4+
.. contents::
5+
:local:
6+
47
How to talk with TestLink in a python shell
58
-------------------------------------------
69

@@ -97,8 +100,26 @@ alternative optional args, default reporter (user for devKey)
97100
>>> tls = testlink.TestLinkHelper().connect(testlink.TestlinkAPIGeneric)
98101
>>> exTCID = tls.getTestCase(testcaseid=a_TestCaseID)[0]['full_tc_external_id']
99102
>>> tls.reportTCResult(a_TestPlanID, 'b', testcaseexternalid=exTCID,
100-
buildid='a build name', platformname='a platform name')
103+
buildid='a build name', platformname='a platform name')
101104

105+
Upload attachments
106+
------------------
107+
108+
uploading attachments can be done in two different ways
109+
110+
with a file descriptor::
111+
112+
a_file_obj=open(A_VALID_FILE_PATH)
113+
newAttachment = myTestLink.uploadExecutionAttachment(a_file_obj, A_Result_ID,
114+
'Attachment Title', 'Attachment Description')
115+
116+
117+
with a file path::
118+
119+
a_file_path=A_VALID_FILE_PATH
120+
newAttachment = myTestLink.uploadExecutionAttachment(a_file_path, A_Result_ID,
121+
'Attachment Title', 'Attachment Description')
122+
102123
List keywords
103124
-------------
104125

@@ -141,6 +162,9 @@ parameter defined as environment variables [2]_: ::
141162
set TESTLINK_API_PYTHON_SERVER_URL=http://[YOURSERVER]/testlink/lib/api/xmlrpc/v1/xmlrpc.php
142163
set TESTLINK_API_PYTHON_DEVKEY=[Users devKey generated by TestLink]
143164
python example\TestLinkExampleGenericApi.py
165+
166+
.. [1] TestLinkExample.py creates a new test project NEW_PROJECT_API-[CountProjects+1].
167+
.. [2] TestLinkExampleGenericApi.py creates a new test project PROJECT_API_GENERIC-[CountProjects+1].
144168
145169
Run unittests
146170
-------------
@@ -158,6 +182,8 @@ Run unittests without TestLink Server interaction: ::
158182
[PYENV]\testlink\Scripts\activate
159183
cd test\utest
160184
python -m unittest discover -s test\utest-offline
185+
186+
Under Py26, unittest2_ must be used.
187+
188+
.. _unittest2: https://pypi.python.org/pypi/unittest2
161189

162-
.. [1] TestLinkExample.py creates a new test project NEW_PROJECT_API-[CountProjects+1].
163-
.. [2] TestLinkExampleGenericApi.py creates a new test project PROJECT_API_GENERIC-[CountProjects+1].

Diff for: src/testlink/testlinkapigeneric.py

+8-15
Original file line numberDiff line numberDiff line change
@@ -522,8 +522,7 @@ def uploadRequirementSpecificationAttachment(self):
522522
523523
mandatory non api args: attachmentfile
524524
- python file descriptor pointing to the file
525-
- !Attention - on WINDOWS use binary mode for none text file
526-
see http://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files
525+
- or a valid file path
527526
528527
default values for filename, filetype, content are determine from
529528
ATTACHMENTFILE, but user could overwrite it, if user want to store the
@@ -540,8 +539,7 @@ def uploadRequirementAttachment(self):
540539
541540
mandatory non api args: attachmentfile
542541
- python file descriptor pointing to the file
543-
- !Attention - on WINDOWS use binary mode for none text file
544-
see http://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files
542+
- or a valid file path
545543
546544
default values for filename, filetype, content are determine from
547545
ATTACHMENTFILE, but user could overwrite it, if user want to store the
@@ -558,8 +556,7 @@ def uploadTestProjectAttachment(self):
558556
559557
mandatory non api args: attachmentfile
560558
- python file descriptor pointing to the file
561-
- !Attention - on WINDOWS use binary mode for none text file
562-
see http://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files
559+
- or a valid file path
563560
564561
default values for filename, filetype, content are determine from
565562
ATTACHMENTFILE, but user could overwrite it, if user want to store the
@@ -576,8 +573,7 @@ def uploadTestSuiteAttachment(self):
576573
577574
mandatory non api args: attachmentfile
578575
- python file descriptor pointing to the file
579-
- !Attention - on WINDOWS use binary mode for none text file
580-
see http://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files
576+
- or a valid file path
581577
582578
default values for filename, filetype, content are determine from
583579
ATTACHMENTFILE, but user could overwrite it, if user want to store the
@@ -594,8 +590,7 @@ def uploadTestCaseAttachment(self):
594590
595591
mandatory non api args: attachmentfile
596592
- python file descriptor pointing to the file
597-
- !Attention - on WINDOWS use binary mode for none text file
598-
see http://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files
593+
- or a valid file path
599594
600595
default values for filename, filetype, content are determine from
601596
ATTACHMENTFILE, but user could overwrite it, if user want to store the
@@ -612,8 +607,7 @@ def uploadExecutionAttachment(self):
612607
613608
mandatory non api args: attachmentfile
614609
- python file descriptor pointing to the file
615-
- !Attention - on WINDOWS use binary mode for none text file
616-
see http://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files
610+
- or a valid file path
617611
618612
default values for filename, filetype, content are determine from
619613
ATTACHMENTFILE, but user could overwrite it, if user want to store the
@@ -632,8 +626,7 @@ def uploadAttachment(self):
632626
633627
mandatory non api args: attachmentfile
634628
- python file descriptor pointing to the file
635-
- !Attention - on WINDOWS use binary mode for none text file
636-
see http://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files
629+
- or a valid file path
637630
638631
default values for filename, filetype, content are determine from
639632
ATTACHMENTFILE, but user could overwrite it, if user want to store the
@@ -1245,7 +1238,7 @@ def _getAttachmentArgs(self, attachmentfile):
12451238
ATTACHMENTFILE via the api to into TL
12461239
12471240
ATTACHMENTFILE could be:
1248-
a) a python file descriptor pointing to the file (class file)
1241+
a) a python file descriptor pointing to the file
12491242
b) a valid file path"""
12501243

12511244
try:

Diff for: src/testlink/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
#
1818
# ------------------------------------------------------------------------
1919

20-
VERSION = '0.6.0-dev40'
20+
VERSION = '0.6.0'
2121
TL_RELEASE = '1.9.12'
2222

0 commit comments

Comments
 (0)