kinow / testlink-java-api

TestLink Java API
http://kinow.github.io/testlink-java-api/
MIT License
64 stars 88 forks source link

Report test case execution duration #55

Closed gunnee closed 5 years ago

gunnee commented 9 years ago

The test case execution duration cannot be added when reporting a test case result (see br.eti.kinoshita.testlinkjavaapi.TestCaseService.reportTCResult). It currently has to be inserted manually.

ashahariharan commented 8 years ago

I want to use the testlink plugin for Jenkins to update the execution duration of test cases. Is this supported

kinow commented 8 years ago

@ashahariharan don't think so. Not yet at least.

kinow commented 8 years ago

Ack @gunnee, just confirmed that we can add this feature with the next release.

Looking at TestLink source code: https://github.com/TestLinkOpenSourceTRMS/testlink-code/blob/testlink_1_9/lib/api/xmlrpc/v1/xmlrpc.class.php

I can see the execution duration optional field.

And we are not passing this parameter from the Java API: https://github.com/kinow/testlink-java-api/blob/master/src/main/java/br/eti/kinoshita/testlinkjavaapi/TestCaseService.java#L574

Seems easy to fix :-) should be included in the next release.

aerbin commented 7 years ago

@kinow In the latest version 1.9.16-1 , still cannot be added test case execution duration. Thank you for fixing it

kinow commented 5 years ago

Done, and adding user and timestamp parameters as well. Tested with 1.9.19.

        ReportTCResultResponse response = api.reportTCResult(testCaseId, null, testPlanId, ExecutionStatus.BLOCKED,
                Collections.emptyList(), buildId, null, "Done!", 12, false, null, null, null, null, false, "admin", null);

Which returned:

ReportTCResultResponse [operation=reportTCResult, overwrite=null, status=null, message=Success!, executionId=2, bugIDStatus=null, customFieldStatus=null]

And the Web interface of TestLink also displays the correct values were used.

image