From 40aeb9e9ba2fb84eb5cf914684637579eaf34e8e Mon Sep 17 00:00:00 2001 From: Luiko Czub Date: Mon, 29 Dec 2014 22:37:56 +0100 Subject: [PATCH] prepare release v0.6.0 --- CHANGES.rst | 31 +++++++++++++++++++++++++++-- MANIFEST.in | 2 +- README.rst | 12 +++++++++++ doc/install.rst | 7 +++++-- doc/usage.rst | 32 +++++++++++++++++++++++++++--- src/testlink/testlinkapigeneric.py | 23 ++++++++------------- src/testlink/version.py | 2 +- 7 files changed, 85 insertions(+), 24 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 4e6dced..d081eb7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,14 +6,41 @@ TestLink-API-Python-client release notes v0.6.0 - under develop support for TestLink release 1.9.12 and py26, py27, py33 and py34 +python 3 suppport - pull requests #33 #37 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Integrates `manojklm `_ -pull request #33 and #37 +pull requests +`#33 `_ +and `#37 `_ - add source and unittest support for py33 and py34 - extend py26 support for unittest2 -- add *.travis.yml* configuration for `Travis CI `_ +- add *.travis.yml* configuration for `Travis CI `_ - add *tox.ini* configuration for `Tox `_ +Track now TestLink-API-Python-client build results on Travis CI - see +https://travis-ci.org/lczub/TestLink-API-Python-client + +extend upload attachments - handling file path #40 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +uploading attachments excepts now also a file path as parameter. + +``` +# still supported 0.5.2 behavior - file descriptor +a_file_obj=open(A_VALID_FILE_PATH) +newAttachment = myTestLink.uploadExecutionAttachment(a_file_obj, A_Result_ID, + 'Attachment Title', 'Attachment Description') +``` + +``` +# new supported 0.6.0 behaviour - file path +newAttachment = myTestLink.uploadExecutionAttachment(A_VALID_FILE_PATH, A_Result_ID, + 'Attachment Title', 'Attachment Description') +``` + + TestLink-API-Python-client release notes v0.5.2 (Oct. 2014) ----------------------------------------------------------- support for TestLink release 1.9.12 diff --git a/MANIFEST.in b/MANIFEST.in index eb98030..af5202e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ -include MANIFEST.in LICENSE-2.0.txt README.rst CHANGES.rst +include MANIFEST.in LICENSE-2.0.txt README.rst CHANGES.rst tox.ini recursive-include src *.py recursive-include example *.py recursive-include example *.png diff --git a/README.rst b/README.rst index 97e25cb..c39f315 100644 --- a/README.rst +++ b/README.rst @@ -6,6 +6,12 @@ James Stock, Olivier Renault, Luiko Czub, TestLink-API-Python-client developers License `Apache License 2.0`_ +.. image:: https://travis-ci.org/lczub/TestLink-API-Python-client.svg?branch=master + :target: https://travis-ci.org/lczub/TestLink-API-Python-client + +.. contents:: + :local: + Introduction ------------ @@ -69,6 +75,10 @@ examples/ tests/ Unit Tests for TestLink API Python Client + +`tox.ini`_ + Configuration for multi Python version testing via `Tox`_ + Help ---- @@ -94,6 +104,8 @@ TestLink-API-Python-client developers .. _Usage: doc/usage.rst .. _TestlinkAPIGeneric: example/TestLinkExampleGenericApi.py .. _TestlinkAPIClient: example/TestLinkExample.py +.. _tox.ini: tox.ini +.. _Tox: http://tox.readthedocs.org/en/latest/ .. _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 diff --git a/doc/install.rst b/doc/install.rst index 8311a35..e218541 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -1,15 +1,18 @@ TestLink-API-Python-client Installation ======================================= +.. contents:: + :local: + Preconditions ------------- -Currently the combinations Python 2.6.6/2.7.8/3.3/3.4 and TestLink 1.9.12 are tested. +Currently the combinations Python 2.6.9/2.7.9/3.3.5/3.4.2 and TestLink 1.9.12 are tested. - Other combination might work - feedback is welcome :-) To use TestLink-API-Python-client under Py26, the module **argparse** must be -installed additionally (Py27 already includes this):: +installed additionally (Py27, Py33 and Py34 already includes this):: pip install argparse diff --git a/doc/usage.rst b/doc/usage.rst index 7b6470f..df063e3 100644 --- a/doc/usage.rst +++ b/doc/usage.rst @@ -1,6 +1,9 @@ TestLink-API-Python-client Usage ================================ +.. contents:: + :local: + How to talk with TestLink in a python shell ------------------------------------------- @@ -97,8 +100,26 @@ alternative optional args, default reporter (user for devKey) >>> tls = testlink.TestLinkHelper().connect(testlink.TestlinkAPIGeneric) >>> exTCID = tls.getTestCase(testcaseid=a_TestCaseID)[0]['full_tc_external_id'] >>> tls.reportTCResult(a_TestPlanID, 'b', testcaseexternalid=exTCID, - buildid='a build name', platformname='a platform name') + buildid='a build name', platformname='a platform name') +Upload attachments +------------------ + +uploading attachments can be done in two different ways + +with a file descriptor:: + + a_file_obj=open(A_VALID_FILE_PATH) + newAttachment = myTestLink.uploadExecutionAttachment(a_file_obj, A_Result_ID, + 'Attachment Title', 'Attachment Description') + + +with a file path:: + + a_file_path=A_VALID_FILE_PATH + newAttachment = myTestLink.uploadExecutionAttachment(a_file_path, A_Result_ID, + 'Attachment Title', 'Attachment Description') + List keywords ------------- @@ -141,6 +162,9 @@ parameter defined as environment variables [2]_: :: 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 example\TestLinkExampleGenericApi.py + +.. [1] TestLinkExample.py creates a new test project NEW_PROJECT_API-[CountProjects+1]. +.. [2] TestLinkExampleGenericApi.py creates a new test project PROJECT_API_GENERIC-[CountProjects+1]. Run unittests ------------- @@ -158,6 +182,8 @@ Run unittests without TestLink Server interaction: :: [PYENV]\testlink\Scripts\activate cd test\utest python -m unittest discover -s test\utest-offline + +Under Py26, unittest2_ must be used. + +.. _unittest2: https://pypi.python.org/pypi/unittest2 -.. [1] TestLinkExample.py creates a new test project NEW_PROJECT_API-[CountProjects+1]. -.. [2] TestLinkExampleGenericApi.py creates a new test project PROJECT_API_GENERIC-[CountProjects+1]. diff --git a/src/testlink/testlinkapigeneric.py b/src/testlink/testlinkapigeneric.py index cbbeb42..e26a7d5 100644 --- a/src/testlink/testlinkapigeneric.py +++ b/src/testlink/testlinkapigeneric.py @@ -522,8 +522,7 @@ def uploadRequirementSpecificationAttachment(self): mandatory non api args: attachmentfile - python file descriptor pointing to the file - - !Attention - on WINDOWS use binary mode for none text file - see http://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files + - or a valid file path default values for filename, filetype, content are determine from ATTACHMENTFILE, but user could overwrite it, if user want to store the @@ -540,8 +539,7 @@ def uploadRequirementAttachment(self): mandatory non api args: attachmentfile - python file descriptor pointing to the file - - !Attention - on WINDOWS use binary mode for none text file - see http://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files + - or a valid file path default values for filename, filetype, content are determine from ATTACHMENTFILE, but user could overwrite it, if user want to store the @@ -558,8 +556,7 @@ def uploadTestProjectAttachment(self): mandatory non api args: attachmentfile - python file descriptor pointing to the file - - !Attention - on WINDOWS use binary mode for none text file - see http://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files + - or a valid file path default values for filename, filetype, content are determine from ATTACHMENTFILE, but user could overwrite it, if user want to store the @@ -576,8 +573,7 @@ def uploadTestSuiteAttachment(self): mandatory non api args: attachmentfile - python file descriptor pointing to the file - - !Attention - on WINDOWS use binary mode for none text file - see http://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files + - or a valid file path default values for filename, filetype, content are determine from ATTACHMENTFILE, but user could overwrite it, if user want to store the @@ -594,8 +590,7 @@ def uploadTestCaseAttachment(self): mandatory non api args: attachmentfile - python file descriptor pointing to the file - - !Attention - on WINDOWS use binary mode for none text file - see http://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files + - or a valid file path default values for filename, filetype, content are determine from ATTACHMENTFILE, but user could overwrite it, if user want to store the @@ -612,8 +607,7 @@ def uploadExecutionAttachment(self): mandatory non api args: attachmentfile - python file descriptor pointing to the file - - !Attention - on WINDOWS use binary mode for none text file - see http://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files + - or a valid file path default values for filename, filetype, content are determine from ATTACHMENTFILE, but user could overwrite it, if user want to store the @@ -632,8 +626,7 @@ def uploadAttachment(self): mandatory non api args: attachmentfile - python file descriptor pointing to the file - - !Attention - on WINDOWS use binary mode for none text file - see http://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files + - or a valid file path default values for filename, filetype, content are determine from ATTACHMENTFILE, but user could overwrite it, if user want to store the @@ -1245,7 +1238,7 @@ def _getAttachmentArgs(self, attachmentfile): ATTACHMENTFILE via the api to into TL ATTACHMENTFILE could be: - a) a python file descriptor pointing to the file (class file) + a) a python file descriptor pointing to the file b) a valid file path""" try: diff --git a/src/testlink/version.py b/src/testlink/version.py index 0ae5050..3c5c5ba 100644 --- a/src/testlink/version.py +++ b/src/testlink/version.py @@ -17,6 +17,6 @@ # # ------------------------------------------------------------------------ -VERSION = '0.6.0-dev40' +VERSION = '0.6.0' TL_RELEASE = '1.9.12'