get_launches_trends
Aggregate launch trends over a window: daily pass rates, most-failing tests, flaky tests, and slowest runs.
Instructions
Aggregate a project over a window: pass rate over time, the tests that fail most, the flaky ones, duration trends and the slowest tests. IMPORTANT: there is no single pass rate in this response. trends.passRate is a SERIES, one row per day, each carrying total_runs, passed_runs and pass_rate; to answer a question about the whole window you have to sum the daily totals yourself rather than average the daily rates, which would weight a quiet day the same as a busy one. And it is a rate over LAUNCHES that ended green, not over tests that passed, and the two differ widely; for the test-level figure use summary.testPassRate from get_launches_statistics. In the failing section, total_runs counts ATTEMPT ROWS rather than launches, so failure_rate is failed attempts over attempts and a test retried three times in one launch contributes three. That section ranks over the WHOLE window and says nothing about the present: a test that failed heavily early on and was fixed still tops the list, and no field in the row - there is no lastStatus and no lastSeen - reveals that it is green today. It answers what has failed most, never what is failing now; for that, read the newest launch with get_launch_tests. Flakiness is ranked by flip_count, the number of times a test changed result between consecutive ATTEMPTS, retries included, alongside instability_score which weighs how evenly it splits between pass and fail. Attempts, not launches: a test that fails twice and passes on the third try in every run scores high here while never once turning a launch red, and flip_count can exceed the number of launches in the window. Only passed and failed attempts are counted, so skipped and flaky rows are absent from both figures. For per-launch flipping, read get_test_history and group by runId. days defaults to 30, so a quiet project returns empty series, and the flaky, slowest and tests-by-tag sections are additionally capped at 90 days however much you pass, while the trend series itself honours the full range: so a 365-day call answers two different windows in one payload. Counts and rates in this response come back as STRINGS, total_runs as "45" and failure_rate as "80.00", so coerce them before comparing or summing. Use include[] to compute only the sections you need and topN to size the lists. Reach for get_launches_statistics to page through individual launches, and get_launch_tests when you have one launch.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Lookback period in days (1-365) | |
| tags | No | Filter runs by these tags | |
| topN | No | Limit for top-N lists (failing, flaky, slowest tests) | |
| include | No | Which trends to include in response | |
| projectId | Yes | Project UUID to analyze |