Skip to content

Commit adc1b06

Browse files
author
Luiko Czub
committed
new api method getExecCountersByBuild() #14
1 parent 3ea8089 commit adc1b06

File tree

6 files changed

+21
-4
lines changed

6 files changed

+21
-4
lines changed

CHANGES.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ new TestlinkAPIGeneric and TestlinkAPIClient api methods
2323
- deleteExecution()
2424
- setTestCaseExecutionType()
2525
- assignRequirements()
26+
- getExecCountersByBuild()
2627

2728
Known TL 1.9.9 limitations:
2829

example/TestLinkExample.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,10 @@
546546
print "getLastExecutionResult", response
547547
response = myTestLink.getLastExecutionResult(newTestPlanID_A, newTestCaseID_B)
548548
print "getLastExecutionResult", response
549+
response = myTestLink.getExecCountersByBuild(newTestPlanID_A)
550+
print "getExecCountersByBuild", response
551+
response = myTestLink.getExecCountersByBuild(newTestPlanID_B)
552+
print "getExecCountersByBuild", response
549553

550554

551555
# get information - general

example/TestLinkExampleGenericApi.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,10 @@
471471
response = myTestLink.getLastExecutionResult(newTestPlanID_A,
472472
testcaseid=newTestCaseID_B)
473473
print "getLastExecutionResult", response
474+
response = myTestLink.getExecCountersByBuild(newTestPlanID_A)
475+
print "getExecCountersByBuild", response
476+
response = myTestLink.getExecCountersByBuild(newTestPlanID_B)
477+
print "getExecCountersByBuild", response
474478

475479

476480
# get information - general

src/testlink/testlinkapigeneric.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -816,10 +816,10 @@ def setTestCaseExecutionType(self):
816816
possible executiontype values
817817
1 = TESTCASE_EXECUTION_TYPE_MANUAL, 2 = TESTCASE_EXECUTION_TYPE_AUTO """
818818

819-
# /**
820-
# *
821-
# */
822-
# public function getExecCountersByBuild($args)
819+
@decoApiCallAddDevKey
820+
@decoMakerApiCallWithArgs(['testplanid'])
821+
def getExecCountersByBuild(self):
822+
""" Gets execution metrics information for a testplan """
823823

824824
@decoApiCallAddDevKey
825825
@decoMakerApiCallWithArgs(['testprojectname', 'platformname'],

test/utest-online/testlinkapi_online_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,11 @@ def test_assignRequirements_unknownID(self):
288288
[{'req_spec' : 4713, 'requirements' : [4714, 4717]},
289289
{'req_spec' : 4723, 'requirements' : [4725]}])
290290

291+
def test_getExecCountersByBuild_unknownID(self):
292+
with self.assertRaisesRegexp(TLResponseError, '3000.*4711'):
293+
self.client.getExecCountersByBuild(4711)
291294

295+
292296

293297
if __name__ == "__main__":
294298
#import sys;sys.argv = ['', 'Test.testName']

test/utest-online/testlinkapigeneric_online_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,10 @@ def test_assignRequirements_unknownID(self):
305305
[{'req_spec' : 4713, 'requirements' : [4714, 4717]},
306306
{'req_spec' : 4723, 'requirements' : [4725]}])
307307

308+
def test_getExecCountersByBuild_unknownID(self):
309+
with self.assertRaisesRegexp(TLResponseError, '3000.*4711'):
310+
self.client.getExecCountersByBuild(4711)
311+
308312

309313

310314
if __name__ == "__main__":

0 commit comments

Comments
 (0)