get_ai_insights
Retrieve AI test failure insights: project-level overview, per-run triage, or case-specific fixes with code snippets. Poll for status when pending.
Instructions
TestDino's AI Insights, at three levels. With testrun_id + testcase_id: that test case's AI fixes — recommendations (investigation/remediation steps + reasoning) and quick fixes (concrete fixes, often with code snippets). With testrun_id only: that run's AI analysis — AI failure categorization (flaky/bug/ui_change), failure clusters, new-failures cards, the error-analysis table, and the LLM-written run summary. With neither: the project-level overview — per-category failure counts over the date range with the top offending test cases in each category. AI payloads are generated lazily: sections may report status "not_generated", "queued", "processing", or "failed" before "completed" — poll this tool every few seconds while "processing". A "disabled" status is terminal (AI features are off for the project, Settings → AI) — do not poll it. Case mode (testrun_id + testcase_id) reports "in_progress" while ai_fixes generate; the run-level sections use "processing". An "unavailable" section carries the upstream statusCode: a 5xx or timeout is transient (retry once), a 4xx (bad ids) is terminal. Use the project overview to answer "what should we fix first?"; the run mode to triage one run; the case mode to get fixes for one failing test — each also serves as the poll target after get_run_details(include_ai_insights=true) / debug_testcase(include_ai_insights=true) reported a pending status. Requires AI features to be enabled in the project settings (Settings → AI).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| toDate | No | Project overview only: custom range end (YYYY-MM-DD). | |
| fromDate | No | Project overview only: custom range start (YYYY-MM-DD). | |
| dateRange | No | Project overview only: e.g. "7d", "30d", or "custom" (with fromDate/toDate). | |
| projectId | Yes | Project ID (Required). The TestDino project identifier. | |
| testrun_id | No | Run mode: AI insights for this single test run. Also required for case mode (with testcase_id). | |
| environment | No | Project overview only: filter by environment name. | |
| testcase_id | No | Case mode: with testrun_id, return AI fixes (recommendations + quick fixes) for this test case (its pw_test_id) in that run. |