Insights
Insights runs aggregation queries against your organization’s test results, metrics, test runs, and tests directly.
entity selects what each row represents, group_by the dimensions to break out by, and measures what to compute. What’s valid depends on the entity:
| Entity | group_by | measures |
|---|---|---|
test_result | behavior, behavior_id, category, category_id, topic, topic_id, test_run, status, year, month | count, passed, failed, pass_rate |
metric | metric_name, behavior_id, year, month | count, passed, failed, pass_rate, automated_passed, automated_failed, human_review_count |
test_run | status, test_set, executor, year, month | count, passed, failed, pass_rate |
test | behavior, behavior_id, category, category_id, topic, topic_id, is_unrun, year, month | count, unrun_count, run_count, passed, failed, pass_rate |
Filters narrow which rows are aggregated, and which keys are valid depends on the entity — a key not listed for that entity returns a 400:
| Entity | filters |
|---|---|
test_result | test_run_ids, behavior_ids, category_ids, topic_ids, status_ids, test_ids, test_type_ids, user_ids, assignee_ids, owner_ids, prompt_ids, test_set_ids, tags |
metric | test_run_ids, behavior_ids, test_ids, metric_names |
test_run | test_run_ids, user_ids, endpoint_ids, test_set_ids, status_names |
test | behavior_ids, category_ids, topic_ids, status_ids, test_ids, test_type_ids, user_ids, assignee_ids, owner_ids, prompt_ids, test_set_ids, tags |
months, start_date, and end_date bound the date range and apply to every entity.