Subscribe Join 180,000+ subscribers and receive articles from our blog about software quality, testing, QA and security. Subscribe

Perform Calculations on timespan fields

I am generating reports using the API and Python and was wondering how to handle calculations on timespan fields, such as Results’ elapsed field.

For example, how can I sum elapsed values for a chunk of Results records?



Welcome to the TestRail Community and thanks for your post.

You would just need to add the column elapsed in the tests tab of the report options. Regarding summing it up, you might have to do that manually right now.

If it were included in the API, you could do it pretty easily but it’s not so we have created a Feature Request for the same.


Hi Shanu,

I was able to use Python and the Testrail API to get the information I needed. FWIW, I used the third party dateutil Python library to convert humanized timestamp strings.