You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug][Testmo] Runs, milestones and automation runs: only the first 100 are collected #9332
Testmo list responses have no meta object. The pagination fields are at the top level of the body: the Testmo REST API spec (RunPage, MilestonePage, AutomationRunPage) lists page, prev_page, next_page, last_page, per_page, total and result. The plugin's own remote scope API already reads this format (ProjectPage in backend/plugins/testmo/api/remote_api.go follows next_page). So meta is always nil, the function always returns 1, and the ApiCollector never requests page 2.
What do you expect to happen
All runs, milestones and automation runs of the project are collected, i.e. the collectors fetch pages 2..last_page.
How to reproduce
Add a Testmo project with more than 100 runs (or milestones / automation runs) as a data scope.
Run the blueprint.
_raw_testmo_runs (and _tool_testmo_runs) hold only 100 rows for the project, while the project's run_count is higher.
A unit test that passes {"page": 1, "next_page": 2, "last_page": 3, "per_page": 100, "total": 250, "result": [...]} to GetTotalPagesFromResponse gets 1 instead of 3.
Anything else
Proposed fix (I have a PR ready): read the top-level last_page in GetTotalPagesFromResponse (1 when it is null), plus a unit test.
Activity