get_root_id_by_suite_id
Retrieve the root suite ID for a specific suite ID in Zebrunner test management. Use this tool to navigate test suite hierarchies by providing a project key and suite ID.
Instructions
๐ Get root suite ID for a specific suite ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_key | Yes | Project key (e.g., 'android' or 'ANDROID') | |
| suite_id | Yes | Suite ID to find root for | |
| format | No | Output format | json |
Implementation Reference
- src/utils/hierarchy.ts:379-389 (helper)The core helper function implementing getRootIdBySuiteId logic. Returns the root suite ID for a given suite ID by checking precomputed rootSuiteId or computing via getRootId. Matches the Java equivalent method and is used in API clients.* Helper function to get root ID for a specific suite ID * Equivalent to: getRootIdBySuiteId(List<TCMTestSuite> allSuites, int id) */ static getRootIdBySuiteId(allSuites: ZebrunnerTestSuite[], id: number): number { const suite = allSuites.find(s => s.id === id); if (suite?.rootSuiteId) { return suite.rootSuiteId; } // If rootSuiteId is not set, calculate it return this.getRootId(allSuites, id); }