Skip to content

Commit 92344ee

Browse files
author
Luiko Czub
committed
version set to v0.4.6
#10 #15
1 parent 572c2d1 commit 92344ee

File tree

6 files changed

+87
-18
lines changed

6 files changed

+87
-18
lines changed

Diff for: CHANGES.rst

+12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
Changes in TestLink-API-Python-client Source Distribution
22
=========================================================
33

4+
TestLink-API-Python-client release notes v0.4.6 (Dec. 2013)
5+
-----------------------------------------------------------
6+
7+
TestLink-API-Python-client is now installable via PyPI #15
8+
9+
pip install TestLink-API-Python-client
10+
11+
new api methods for Platforms implemented #10
12+
13+
- createPlatform, getProjectPlatforms
14+
- addPlatformToTestPlan, removePlatformFromTestPlan
15+
416
TestLink-API-Python-client release notes v0.4.5 (Nov. 2013)
517
-----------------------------------------------------------
618

Diff for: doc/install.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ Preconditions
55
-------------
66

77
Currently only the combination Python 2.7 and TestLink 1.9.8/1.9.9 is tested.
8-
Other combination might work - feedback is welcome :-)
8+
9+
- Other combination might work - feedback is welcome :-)
910

1011
TestLink configuration
1112
----------------------
@@ -95,7 +96,7 @@ privileges for installation, a separate TestLink virtualenv_ may help::
9596

9697
If you always work with the same TestLink server, extend the script
9798

98-
- [PYENV]\testlink\Scripts\activate.
99+
- [PYENV]/testlink/Scripts/activate[.bat|.ps1]
99100

100101
with connection parameter as environment variables
101102

Diff for: doc/usage.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ or generate a description of all implemented API method: ::
3838
Run Examples
3939
------------
4040

41-
Running example [#]_, how to use the class TestlinkAPIClient, with connection
42-
parameter defined as command line arguments: ::
41+
Running example, how to use the class TestlinkAPIClient, with connection
42+
parameter defined as command line arguments [1]_: ::
4343

4444
[PYENV]\testlink\Scripts\activate
4545
python example\TestLinkExample.py
4646
--server_url http://[YOURSERVER]/testlink/lib/api/xmlrpc.php
4747
--devKey [Users devKey generated by TestLink]
4848

49-
Running example [#]_, how to use the class TestlinkAPIGeneric, with connection
50-
parameter defined as environment variables: ::
49+
Running example, how to use the class TestlinkAPIGeneric, with connection
50+
parameter defined as environment variables [2]_: ::
5151

5252
[PYENV]\testlink\Scripts\activate
5353
set TESTLINK_API_PYTHON_SERVER_URL=http://[YOURSERVER]/testlink/lib/api/xmlrpc/v1/xmlrpc.php
@@ -71,5 +71,5 @@ Run unittests without TestLink Server interaction: ::
7171
cd test\utest
7272
python -m unittest discover -s test\utest-offline
7373

74-
.. [#] TestLinkExample.py creates a new test project NEW_PROJECT_API-[CountProjects+1].
75-
.. [#] TestLinkExampleGenericApi.py creates a new test project PROJECT_API_GENERIC-[CountProjects+1].
74+
.. [1] TestLinkExample.py creates a new test project NEW_PROJECT_API-[CountProjects+1].
75+
.. [2] TestLinkExampleGenericApi.py creates a new test project PROJECT_API_GENERIC-[CountProjects+1].

Diff for: example/TestLinkExample.py

+61-5
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@
8383
NEWPROJECT="NEW_PROJECT_API-%i" % projNr
8484
NEWPREFIX="NPROAPI%i" % projNr
8585
NEWTESTPLAN="TestPlan_API"
86+
NEWPLATFORM_A='Big Birds %i' % projNr
87+
NEWPLATFORM_B='Small Birds'
88+
NEWPLATFORM_C='Ugly Birds'
8689
NEWTESTSUITE_A="A - First Level"
8790
NEWTESTSUITE_B="B - First Level"
8891
NEWTESTSUITE_AA="AA - Second Level"
@@ -163,6 +166,35 @@
163166
print "New Test Plan '%s' - id: %s" % (NEWTESTPLAN,newTestPlanID)
164167
# -- END CHANGE v0.4.5 --
165168

169+
# -- Start NEW v0.4.6 --
170+
# Create platform 'Big Birds x'
171+
newPlatForm = myTestLink.createPlatform(NEWPROJECT, NEWPLATFORM_A,
172+
notes='Platform for Big Birds, unique name, only used in this project')
173+
print "createPlatform", newPlatForm
174+
newPlatFormID_A = newPlatForm['id']
175+
# Add Platform 'Big Bird x' to platform
176+
response = myTestLink.addPlatformToTestPlan(newTestPlanID, NEWPLATFORM_A)
177+
print "addPlatformToTestPlan", response
178+
179+
# Create platform 'Small Birds'
180+
newPlatForm = myTestLink.createPlatform(NEWPROJECT, NEWPLATFORM_B,
181+
notes='Platform for Small Birds, name used in all example projects')
182+
print "createPlatform", newPlatForm
183+
newPlatFormID_B = newPlatForm['id']
184+
# Add Platform 'Small Bird' to platform
185+
response = myTestLink.addPlatformToTestPlan(newTestPlanID, NEWPLATFORM_B)
186+
print "addPlatformToTestPlan", response
187+
188+
# Create platform 'Ugly Birds'
189+
newPlatForm = myTestLink.createPlatform(NEWPROJECT, NEWPLATFORM_C,
190+
notes='Platform for Ugly Birds, will be removed from test plan')
191+
print "createPlatform", newPlatForm
192+
newPlatFormID_C = newPlatForm['id']
193+
# Add Platform 'Ugly Bird' to platform
194+
response = myTestLink.addPlatformToTestPlan(newTestPlanID, NEWPLATFORM_C)
195+
print "addPlatformToTestPlan", response
196+
# -- End NEW v0.4.6 --
197+
166198
#Creates the test Suite A
167199
newTestSuite = myTestLink.createTestSuite(newProjectID, NEWTESTSUITE_A,
168200
"Details of the Test Suite A")
@@ -274,34 +306,58 @@
274306
# -- New Examples with v0.4.5 --
275307

276308
# Add test cases to test plan - we need the full external id !
309+
# TC AA should be tested with platforms 'Big Birds'+'Small Birds'
277310
tc_aa_full_ext_id = myTestLink.getTestCase(newTestCaseID_AA)[0]['full_tc_external_id']
278311
response = myTestLink.callServerWithPosArgs('addTestCaseToTestPlan',
279312
devKey=myTestLink.devKey, testprojectid=newProjectID,
280313
testplanid=newTestPlanID, testcaseexternalid=tc_aa_full_ext_id,
281-
version=1)
314+
platformid=newPlatFormID_A,version=1)
282315
print "addTestCaseToTestPlan", response
316+
tc_aa_full_ext_id = myTestLink.getTestCase(newTestCaseID_AA)[0]['full_tc_external_id']
317+
response = myTestLink.callServerWithPosArgs('addTestCaseToTestPlan',
318+
devKey=myTestLink.devKey, testprojectid=newProjectID,
319+
testplanid=newTestPlanID, testcaseexternalid=tc_aa_full_ext_id,
320+
platformid=newPlatFormID_B,version=1)
321+
print "addTestCaseToTestPlan", response
322+
# TC B should be tested with platform 'Small Birds'
283323
tc_b_full_ext_id = myTestLink.getTestCase(testcaseid=newTestCaseID_B)[0]['full_tc_external_id']
284324
response = myTestLink.callServerWithPosArgs('addTestCaseToTestPlan',
285325
devKey=myTestLink.devKey, testprojectid=newProjectID,
286326
testplanid=newTestPlanID, testcaseexternalid=tc_b_full_ext_id,
287-
version=1)
327+
platformid=newPlatFormID_B,version=1)
288328
print "addTestCaseToTestPlan", response
329+
330+
# # Try to Remove Platform 'Big Birds' from platform
331+
# response = myTestLink.removePlatformFromTestPlan(newTestPlanID, NEWPLATFORM_C)
332+
# print "removePlatformFromTestPlan", response
333+
334+
# Remove Platform 'Ugly Birds' from platform
335+
response = myTestLink.removePlatformFromTestPlan(newTestPlanID, NEWPLATFORM_C)
336+
print "removePlatformFromTestPlan", response
289337

290338
# -- Create Build
291339
newBuild = myTestLink.createBuild(newTestPlanID, NEWBUILD, 'Notes for the Build')
292340
print "createBuild", newBuild
293341
newBuildID = newBuild[0]['id']
294342
print "New Build '%s' - id: %s" % (NEWBUILD, newBuildID)
295343

296-
# report Test Case Results
344+
# report Test Case Results for platform 'Big Bird'
297345
# TC_AA failed, build should be guessed, TC identified with external id
298346
newResult = myTestLink.reportTCResult(None, newTestPlanID, None, 'f', '', guess=True,
299-
testcaseexternalid=tc_aa_full_ext_id)
347+
testcaseexternalid=tc_aa_full_ext_id,
348+
platformname=NEWPLATFORM_A)
300349
print "reportTCResult", newResult
301350
newResultID_AA = newResult[0]['id']
351+
# report Test Case Results for platform 'Small Bird'
352+
# TC_AA passed, build should be guessed, TC identified with external id
353+
newResult = myTestLink.reportTCResult(None, newTestPlanID, None, 'p', '', guess=True,
354+
testcaseexternalid=tc_aa_full_ext_id,
355+
platformname=NEWPLATFORM_B)
356+
print "reportTCResult", newResult
357+
newResultID_AA_p = newResult[0]['id']
302358
# TC_B passed, explicit build and some notes , TC identified with internal id
303359
newResult = myTestLink.reportTCResult(newTestCaseID_B, newTestPlanID, NEWBUILD,
304-
'p', 'first try')
360+
'p', 'first try', platformname=NEWPLATFORM_B)
305361
print "reportTCResult", newResult
306362
newResultID_B = newResult[0]['id']
307363

Diff for: example/TestLinkExampleGenericApi.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -241,17 +241,17 @@
241241
testplanid=newTestPlanID, testcaseexternalid=tc_aa_full_ext_id,
242242
platformid=newPlatFormID_B,version=1)
243243
print "addTestCaseToTestPlan", response
244-
# TC B should be tested with platforms 'Small Bird'
244+
# TC B should be tested with platform 'Small Bird'
245245
tc_b_full_ext_id = myTestLink.getTestCase(testcaseid=newTestCaseID_B)[0]['full_tc_external_id']
246246
response = myTestLink.callServerWithPosArgs('addTestCaseToTestPlan',
247247
devKey=myTestLink.devKey, testprojectid=newProjectID,
248248
testplanid=newTestPlanID, testcaseexternalid=tc_b_full_ext_id,
249249
platformid=newPlatFormID_B,version=1)
250250
print "addTestCaseToTestPlan", response
251251

252-
# Remove Platform 'Big Bird' from platform
253-
response = myTestLink.removePlatformFromTestPlan(newTestPlanID, NEWPLATFORM_C)
254-
print "removePlatformFromTestPlan", response
252+
# # Try to Remove Platform 'Big Bird' from platform
253+
# response = myTestLink.removePlatformFromTestPlan(newTestPlanID, NEWPLATFORM_C)
254+
# print "removePlatformFromTestPlan", response
255255

256256
# Remove Platform 'Ugly Bird' from platform
257257
response = myTestLink.removePlatformFromTestPlan(newTestPlanID, NEWPLATFORM_C)

Diff for: src/testlink/version.py

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

20-
VERSION = '0.4.6-DEV-10'
20+
VERSION = '0.4.6'

0 commit comments

Comments
 (0)