Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

0 votes


Accepted answer

Permanent link
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>
Jürgen Brückler selected this answer as the correct answer

0 votes


One other answer

Permanent link

Paul, thanks for your response.

Yes, you are right, the totalRunTime will be calculated.
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".

So maybe the problem lies in the Web editor for Test Case Results ...?

0 votes

Comments

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... ;-) ) 

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,951
× 137
× 2

Question asked: Sep 10 '18, 2:21 a.m.

Question was seen: 2,660 times

Last updated: Sep 11 '18, 5:21 a.m.

Related questions
Confirmation Cancel Confirm