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

Experiences/Problems with Perl's TestRail::API Module


Hi there,

I’ve been playing around with Perl’s TestRail::API module. This is part of an evaluation process to see if my employer should purchase Testrail.

I’m seeing a few unexpected API returns.
e.g. if I execute:
$milestones_data_from_api = $testrail_object->getMilestones($project_id);
I get the parent milestones in the project but not any of the “children” milestones.

I’m wondering if I am misunderstanding how to use the API or if there are limitations with the perl module or limitations with the TestRail API.

On a more general note, would more experienced TestRail users recommend using Perl to access the API?

Many thanks,


It’s a limitation of the API. get_milestones doesn’t return any child milestones. You have to loop through the milestones returned and run the get_milestone API call on each one to get the child milestones. This Perl script ( does this.

Also, I’ve used both Perl and python to access the TestRail API, and they’re both very good.


Hi Donalaya!
Thanks for the speedy reply. Will give it a go first chance.


I’m confirming that I verified donalaya’s explanation. Many thanks again.


Thanks donalaya.

It would really help if the API documentation would state this fact too!

It would help even more if the API just returned all milestones, including sub ones, when calling get_milestones()!