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


#1

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,
Andrew


#2

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 (https://github.com/zenoss/testrail-jira-gadgets/blob/master/scripts/generate-milestone-gadget-xml.pl) does this.

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


#3

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


#4

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


#5

Thanks donalaya.

@tgurock:
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()!