Skip to content

Commit a16e60b

Browse files
author
Luiko Czub
committed
changed api createPlatform - optional args platformondesign, platformonexecution (TL 1.9.20_fixed) #139
1 parent 1fb0cd2 commit a16e60b

8 files changed

+61
-18
lines changed

CHANGES.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
11
Changes in TestLink-API-Python-client Source Distribution
22
=========================================================
33

4+
TestLink-API-Python-client v0.8.2 (under develop)
5+
------------------------------------------------
6+
support for TL 1.9.20_fixed changes and py39
7+
8+
main topic is to support TL 1.9.20_fixed api changes
9+
10+
implement 1.9.20_fixed changed api interfaces - #139
11+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12+
13+
changed TestlinkAPIGeneric and TestlinkAPIClient api methods
14+
15+
- createPlatform() is adapted to support new optional boolean arguments
16+
<platformondesign> and <platformonexecution>
17+
- When they are not set to <True>, assignTestCaseExecutionTask() might fail
18+
with an error like
19+
- TLResponseError: 3041: Test plan (name:TestPlan_API A) has no platforms linked
20+
421
TestLink-API-Python-client v0.8.1-fix131 (Mar. 2020)
522
------------------------------------------------------------
623

README.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
TestLink API Python Client
22
==========================
33

4-
Copyright 2011-2019
4+
Copyright 2011-2021
55
James Stock, Olivier Renault, Luiko Czub, TestLink-API-Python-client developers
66

77
License `Apache License 2.0`_
@@ -93,7 +93,7 @@ TestLink-API-Python-client developers
9393
-------------------------------------
9494
* `James Stock`_, `Olivier Renault`_, `lczub`_, `manojklm`_ (PY3)
9595
* `g4l4drim`_, `pade`_, `anton-matosov`_, `citizen-stig`_, `charz`_, `Maberi`_
96-
* `Brian-Williams`_, `alexei-drozdov`_, `janLo`_, `heuj`_
96+
* `Brian-Williams`_, `alexei-drozdov`_, `janLo`_, `heuj`_, `elapfra`_
9797
* anyone forgotten?
9898

9999
.. _Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0
@@ -122,3 +122,4 @@ TestLink-API-Python-client developers
122122
.. _alexei-drozdov: https://github.com/alexei-drozdov/TestLink-API-Python-client
123123
.. _janLo: https://github.com/janLo/TestLink-API-Python-client
124124
.. _heuj: https://github.com/heuj/TestLink-API-Python-client
125+
.. _elapfra: https://github.com/elapfra/TestLink-API-Python-client

example/TestLinkExample.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#! /usr/bin/python
22
# -*- coding: UTF-8 -*-
33

4-
# Copyright 2011-2019 Olivier Renault, Luiko Czub, TestLink-API-Python-client developers
4+
# Copyright 2011-2021 Olivier Renault, Luiko Czub, TestLink-API-Python-client developers
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -194,7 +194,8 @@
194194

195195
# Create platform 'Big Birds x'
196196
newPlatForm = myTestLink.createPlatform(NEWPROJECT, NEWPLATFORM_A,
197-
notes='Platform for Big Birds, unique name, only used in this project')
197+
notes='Platform for Big Birds, unique name, only used in this project',
198+
platformondesign=True, platformonexecution=True)
198199
print("createPlatform", newPlatForm)
199200
newPlatFormID_A = newPlatForm['id']
200201
# Add Platform 'Big Bird x' to platform
@@ -203,7 +204,8 @@
203204

204205
# Create platform 'Small Birds'
205206
newPlatForm = myTestLink.createPlatform(NEWPROJECT, NEWPLATFORM_B,
206-
notes='Platform for Small Birds, name used in all example projects')
207+
notes='Platform for Small Birds, name used in all example projects',
208+
platformondesign=True, platformonexecution=True)
207209
print("createPlatform", newPlatForm)
208210
newPlatFormID_B = newPlatForm['id']
209211
# Add Platform 'Small Bird' to platform
@@ -212,7 +214,8 @@
212214

213215
# Create platform 'Ugly Birds'
214216
newPlatForm = myTestLink.createPlatform(NEWPROJECT, NEWPLATFORM_C,
215-
notes='Platform for Ugly Birds, will be removed from test plan')
217+
notes='Platform for Ugly Birds, will be removed from test plan',
218+
platformondesign=True, platformonexecution=True)
216219
print("createPlatform", newPlatForm)
217220
newPlatFormID_C = newPlatForm['id']
218221
# Add Platform 'Ugly Bird' to platform

example/TestLinkExampleGenericApi.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#! /usr/bin/python
22
# -*- coding: UTF-8 -*-
33

4-
# Copyright 2013-2019 Luiko Czub, TestLink-API-Python-client developers
4+
# Copyright 2013-2021 Luiko Czub, TestLink-API-Python-client developers
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -181,7 +181,8 @@
181181

182182
# Create platform 'Big Bird x'
183183
newPlatForm = myTestLink.createPlatform(NEWPROJECT, NEWPLATFORM_A,
184-
notes='Platform for Big Birds, unique name, only used in this project')
184+
notes='Platform for Big Birds, unique name, only used in this project',
185+
platformondesign=True, platformonexecution=True)
185186
print("createPlatform", newPlatForm)
186187
newPlatFormID_A = newPlatForm['id']
187188
# Add Platform 'Big Bird x' to platform
@@ -190,7 +191,8 @@
190191

191192
# Create platform 'Small Bird'
192193
newPlatForm = myTestLink.createPlatform(NEWPROJECT, NEWPLATFORM_B,
193-
notes='Platform for Small Birds, name used in all example projects')
194+
notes='Platform for Small Birds, name used in all example projects',
195+
platformondesign=True, platformonexecution=True)
194196
print("createPlatform", newPlatForm)
195197
newPlatFormID_B = newPlatForm['id']
196198
# Add Platform 'Small Bird' to platform
@@ -199,7 +201,8 @@
199201

200202
# Create platform 'Ugly Bird'
201203
newPlatForm = myTestLink.createPlatform(NEWPROJECT, NEWPLATFORM_C,
202-
notes='Platform for Ugly Birds, will be removed from test plan')
204+
notes='Platform for Ugly Birds, will be removed from test plan',
205+
platformondesign=True, platformonexecution=True)
203206
print("createPlatform", newPlatForm)
204207
newPlatFormID_C = newPlatForm['id']
205208
# Add Platform 'Ugly Bird' to platform

src/testlink/testlinkapigeneric.py

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,10 +1214,25 @@ def setTestCaseExecutionType(self):
12141214
@decoMakerApiCallWithArgs(['testplanid'])
12151215
def getExecCountersByBuild(self):
12161216
""" Gets execution metrics information for a testplan """
1217-
1217+
# /**
1218+
# * create platform
1219+
# *
1220+
# * @param struct $args
1221+
# * @param string $args["devKey"]
1222+
# * @param string $args["testprojectname"]
1223+
# * @param string $args["platformname"]
1224+
# * @param string $args["notes"]
1225+
# * @param boolean $args["platformondesign"]
1226+
# * @param boolean $args["platformonexecution"]
1227+
# * @return mixed $resultInfo
1228+
# * @internal revisions
1229+
# */
1230+
# public function createPlatform($args) {
1231+
12181232
@decoApiCallAddDevKey
12191233
@decoMakerApiCallWithArgs(['testprojectname', 'platformname'],
1220-
['notes'])
1234+
['notes',
1235+
'platformondesign', 'platformonexecution'])
12211236
def createPlatform(self):
12221237
""" Creates a platform for test project """
12231238

src/testlink/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#! /usr/bin/python
22
# -*- coding: UTF-8 -*-
33

4-
# Copyright 2013-2020 TestLink-API-Python-client developers
4+
# Copyright 2013-2021 TestLink-API-Python-client developers
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -17,5 +17,5 @@
1717
#
1818
# ------------------------------------------------------------------------
1919

20-
VERSION = '0.8.2-dev148'
20+
VERSION = '0.8.2-dev139'
2121
TL_RELEASE = '1.9.20-fixed'

test/utest-offline/test_apiClients_whatArgs.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#! /usr/bin/python
22
# -*- coding: UTF-8 -*-
33

4-
# Copyright 2018-2019 Luiko Czub, TestLink-API-Python-client developers
4+
# Copyright 2018-2021 Luiko Czub, TestLink-API-Python-client developers
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -109,8 +109,10 @@ def test_whatArgs_unknownMethods(api_client):
109109
'title=<title>', 'description=<description>',
110110
'filename=<filename>', 'filetype=<filetype>',
111111
'content=<content>']),
112+
('createPlatform',['<testprojectname>,', '<platformname>,', 'notes=<notes>',
113+
'platformondesign=<platformondesign>',
114+
'platformonexecution=<platformonexecution>']),
112115
('closeBuild', ['<buildid>'])
113-
114116
]
115117

116118
@pytest.mark.parametrize("apiCall, descriptions",

test/utest-online/test_apiCall_equalPositionalArgs.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#! /usr/bin/python
22
# -*- coding: UTF-8 -*-
33

4-
# Copyright 2013-2019 Luiko Czub, TestLink-API-Python-client developers
4+
# Copyright 2013-2021 Luiko Czub, TestLink-API-Python-client developers
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -192,7 +192,9 @@ def test_getTotalsForTestPlan_unknownID(api_client):
192192
def test_createPlatform_unknownID(api_client):
193193
with pytest.raises(TLResponseError, match='7011.*40000711'):
194194
api_client.createPlatform('Project 40000711', 'Platform 40000712',
195-
notes='note 40000713')
195+
notes='note 40000713',
196+
platformondesign=True,
197+
platformonexecution=True)
196198

197199
def test_addPlatformToTestPlan_unknownID(api_client):
198200
with pytest.raises(TLResponseError, match='3000.*40000711'):

0 commit comments

Comments
 (0)