testrail-api icon indicating copy to clipboard operation
testrail-api copied to clipboard

get_suites breaking change in TestRail 9.3.1

Open kylecr11 opened this issue 5 months ago • 2 comments

TestRail 9.3.1 release included a breaking change to the get_suites.

Breaking change on the get_suites endpoint from TestRail 9.3.1 onwards, as it was updated to support pagination.

The get_suites endpoint now aligns more closely with the get_projects. The get_suites method should now include parameters for limit and offset. The endpoint also now returns a dict instead of only list of suites

Current Implementation:

    def get_suites(self, project_id: int) -> list[dict]:
        """
        Returns a list of test suites for a project.

        :param project_id:
            The ID of the project
        :return: response
        """
        return self.s.get(endpoint=f"get_suites/{project_id}")

Suggestion to Support TestRail 9.3.1 and >:

    def get_suites(self, project_id: int, limit: int = 250, offset: int = 0) -> dict:
        """
        Returns a list of test suites for a project.

        :param project_id:
            The ID of the project
        :return: response
        """
        return self.s.get(endpoint=f"get_suites/{project_id}", params=dict(limit=limit, offset=offset))

kylecr11 avatar Sep 10 '25 17:09 kylecr11

why does testrail even have a v2 in their api path if they're not even gonna use it when they do stuff like this.

dsayling avatar Sep 10 '25 20:09 dsayling

why does testrail even have a v2 in their api path if they're not even gonna use it when they do stuff like this.

I’ve shared the same opinion with their support previously. For this specific issue I actually ran across it before they made an announcement or update the documentation. I had to reverse engineer why our code was broken out of no where. Very frustrating experience.

kylecr11 avatar Sep 10 '25 22:09 kylecr11