get_slowest_tests
Identify and analyze the slowest tests in your project to optimize CI pipeline performance. Sort tests by P95 duration, filter by framework or branch, and pinpoint bottlenecks for targeted improvements.
Instructions
Get the slowest tests in a project, sorted by P95 duration.
When using a user API Key (gaf_), you must provide a projectId. Use list_projects first to find available project IDs.
Parameters:
projectId (required): Project ID to analyze
days (optional): Analysis period in days (default: 30, max: 365)
limit (optional): Max tests to return (default: 20, max: 100)
framework (optional): Filter by framework (e.g., "playwright", "vitest")
branch (optional): Filter by git branch (e.g., "main", "develop")
Returns:
List of slowest tests with:
name: Short test name
fullName: Full test name including describe blocks
filePath: Test file path (if available)
framework: Test framework used
avgDurationMs: Average test duration in milliseconds
p95DurationMs: 95th percentile duration (used for sorting)
runCount: Number of times the test ran in the period
Summary with project info and period
Use cases:
"Which tests are slowing down my CI pipeline?"
"Find the slowest Playwright tests to optimize"
"Show me e2e tests taking over 30 seconds"
"What are the slowest tests on the main branch?"
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project ID to get slowest tests for. Required. Use list_projects to find project IDs. | |
| days | No | Analysis period in days (default: 30) | |
| limit | No | Maximum number of tests to return (default: 20) | |
| framework | No | Filter by test framework (e.g., "playwright", "vitest", "jest") | |
| branch | No | Filter by git branch name (e.g., "main", "develop") |