get_root_id_by_suite_id
Find the root test suite ID for any given suite ID in Zebrunner test management. Use this tool to navigate test suite hierarchies and identify parent relationships within your project structure.
Instructions
🔍 Get root suite ID for a specific suite ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | Output format | json |
| project_key | Yes | Project key (e.g., 'android' or 'ANDROID') | |
| suite_id | Yes | Suite ID to find root for |
Implementation Reference
- src/utils/hierarchy.ts:382-389 (helper)The core implementation of getRootIdBySuiteId as a static helper method in HierarchyProcessor class. This function retrieves the root suite ID for a given suite ID, first checking if it's pre-computed on the suite object, otherwise calculating it dynamically using getRootId. This matches the Java equivalent method mentioned in comments.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); }