How to set Total Run Time when creating an executionresult via REST API
We import test results from an external tool into RQM by using the REST API.
Therefore we create executionresult-records. In these we set startTime and endTime.
I would have expected that Total Run Time will be calculated from the time elapsed between startTime and endTime, but it still shows 0 sec.
Is there a way to set the Total Run Time via REST API or to cause RQM to calculate it from the values of startTime and endTime?
Thank you!
Juergen
Accepted answer
The er:totalRunTime property is read-only (see https://jazz.net/products/rational-quality-manager/api-doc-6.0.6/schemas/executionresult_xsd/elements/totalRunTime.html). It's calculated using the following formula:
er:endTime - er:startTime
Note: The er:totalRunTime property is only populated with both the er:endTime and er:startTime properties are set.
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #4e9072}
</style>
One other answer
Paul, thanks for your response.
Yes, you are right, the totalRunTime will be calculated.
I retrieved the executionresult via GET:
I retrieved the executionresult via GET:
<ns16:starttime>2018-08-06T15:47:42.000Z</ns16:starttime>
<ns16:endtime>2018-08-06T15:51:22.000Z</ns16:endtime>
<ns16:totalRunTime>220000</ns16:totalRunTime>
220 sec is calculated correctly - perfect.
When hovering over the result in the Test Case Result Web Browser, the bubble says:
Start Time: |
Aug 6, 2018 5:47:42 PM
|
End Time: | Aug 6, 2018 5:51:22 PM |
Total Run Time: | 3 min 40 sec |
BUT:
When I click on this result and display it in the WebClient, startTime and endTime is displayed (as in the bubble), but "Total Run Time" will be shown as "0 sec".
When I click on this result and display it in the WebClient, startTime and endTime is displayed (as in the bubble), but "Total Run Time" will be shown as "0 sec".
So maybe the problem lies in the Web editor for Test Case Results ...?
Comments
Please open a new defect for this symptom. Note, there some related defects:
Thanks, Paul!
Here is the link to the defect I've created:
172344: Test Case Result being created via REST API: Total Run Time shows 0 sec ONLY in Web Editor (section "Result Details")
(for documentation purposes... ;-) )