# Test Results

Query historical test execution results.

Test results provide detailed information about individual test executions across multiple runs. You can filter by date range, branch, tags, git author, and outcome (`status[]` values use the `RecordedTestOutcome` schema).

## Get test results

> Get historical test execution results for a specific test signature

```json
{"openapi":"3.0.2","info":{"title":"Currents REST API","version":"1.0.0"},"tags":[{"name":"Test Results","description":"Query historical test execution results.\n\nTest results provide detailed information about individual test executions\nacross multiple runs. You can filter by date range, branch, tags, git author,\nand outcome (`status[]` values use the `RecordedTestOutcome` schema)."}],"servers":[{"url":"https://api.currents.dev/v1","description":"Production API"},{"url":"https://api-staging.currents.dev/v1","description":"Staging API"},{"url":"http://localhost:4000/v1","description":"Local development"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key authentication using Bearer token"}},"parameters":{"SignaturePath":{"name":"signature","in":"path","required":true,"description":"The test signature","schema":{"type":"string"}},"DateStartQuery":{"name":"date_start","in":"query","required":true,"description":"Start date in ISO 8601 format","schema":{"type":"string","format":"date-time"}},"DateEndQuery":{"name":"date_end","in":"query","required":true,"description":"End date in ISO 8601 format","schema":{"type":"string","format":"date-time"}},"LimitQuery":{"name":"limit","in":"query","required":false,"description":"Maximum number of items to return (default: 10, max: 50)","schema":{"type":"integer","minimum":1,"maximum":50,"default":10}},"StartingAfterQuery":{"name":"starting_after","in":"query","required":false,"description":"Cursor for pagination. Returns items after this cursor value.","schema":{"type":"string"}},"EndingBeforeQuery":{"name":"ending_before","in":"query","required":false,"description":"Cursor for pagination. Returns items before this cursor value.","schema":{"type":"string"}},"TagsQuery":{"name":"tags[]","in":"query","required":false,"description":"Filter by tags (can be specified multiple times using bracket notation, e.g., tags[]=value1&tags[]=value2)","schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true},"BranchesQuery":{"name":"branches[]","in":"query","required":false,"description":"Filter by git branch. Use trailing `*` for prefix match (e.g. `release/*`). Max 250 characters per value.","schema":{"type":"array","items":{"$ref":"#/components/schemas/BranchFilterQueryValue"}},"style":"form","explode":true},"AuthorsQuery":{"name":"authors[]","in":"query","required":false,"description":"Filter by git authors (can be specified multiple times using bracket notation, e.g., authors[]=author1&authors[]=author2)","schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true},"GroupsQuery":{"name":"groups[]","in":"query","required":false,"description":"Filter by groups (can be specified multiple times using bracket notation, e.g., groups[]=group1&groups[]=group2)","schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true}},"schemas":{"BranchFilterQueryValue":{"description":"Branch filter value: an exact branch name, or a trailing `*` for prefix match (e.g. `release/*`). Max 250 characters.","oneOf":[{"type":"string","description":"Exact branch name (must not contain `*` or spaces).","pattern":"^[!-)+-~]+$","maxLength":250},{"type":"string","description":"Prefix match: branch prefix followed by `*`.","pattern":"^[!-)+-~]+\\*$","maxLength":250}]},"RecordedTestOutcome":{"type":"string","description":"Final per-test outcome stored in Currents.\n\n- **passed** — Runner reported success.\n- **failed** — Runner reported failure (assertions, errors, timeouts, etc.).\n- **pending** — Intentional skip or disabled test (e.g. `test.skip()` / `it.skip()`). In **Tests Explorer** (`GET /tests/{projectId}`) this increments `metrics.ignored` and does **not** increment `metrics.failures`.\n- **skipped** — Runner reported a skip without a normal pass/fail (often interrupted or never executed as pass/fail). In **Tests Explorer** this increments `metrics.failures` together with `failed` (there is no separate `skipped` counter in that response). On **run and spec** payloads, `stats.skipped` is still reported separately from `stats.failures` and `stats.pending`.","enum":["passed","failed","pending","skipped"]},"TestResultsResponse":{"type":"object","required":["status","has_more","data"],"properties":{"status":{"type":"string","enum":["OK"]},"has_more":{"type":"boolean"},"data":{"type":"array","items":{"$ref":"#/components/schemas/TestResult"}}}},"TestResult":{"type":"object","properties":{"cursor":{"type":"string"},"signature":{"type":"string"},"framework":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"projectId":{"type":"string"},"groupId":{"type":"string"},"runId":{"type":"string"},"instanceId":{"type":"string"},"spec":{"type":"string"},"machineId":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"title":{"type":"array","items":{"type":"string"}},"testId":{"type":"string"},"displayError":{"type":"string","nullable":true},"commit":{"type":"object","properties":{"branch":{"type":"string"},"authorEmail":{"type":"string"},"authorName":{"type":"string"},"sha":{"type":"string"},"message":{"type":"string"}}},"duration":{"type":"integer"},"flaky":{"type":"boolean"},"expectedStatus":{"type":"string","nullable":true},"status":{"$ref":"#/components/schemas/RecordedTestOutcome"},"attempts":{"type":"array","items":{"type":"object","properties":{"attemptId":{"type":"string"},"state":{"type":"string"},"error":{"type":"object","nullable":true,"properties":{"message":{"type":"string"},"stack":{"type":"string"},"location":{"type":"object"}}},"startedAt":{"type":"string","format":"date-time"},"duration":{"type":"integer"}}}},"annotations":{"type":"array","nullable":true,"items":{"type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"}}}}}},"ErrorResponse":{"type":"object","required":["status","error"],"properties":{"status":{"type":"string","enum":["FAILED"]},"error":{"type":"string","description":"Error message"}}}},"responses":{"BadRequest":{"description":"Invalid request parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Unauthorized":{"description":"Authentication failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/test-results/{signature}":{"get":{"summary":"Get test results","description":"Get historical test execution results for a specific test signature","operationId":"getTestResults","tags":["Test Results"],"parameters":[{"$ref":"#/components/parameters/SignaturePath"},{"$ref":"#/components/parameters/DateStartQuery"},{"$ref":"#/components/parameters/DateEndQuery"},{"$ref":"#/components/parameters/LimitQuery"},{"$ref":"#/components/parameters/StartingAfterQuery"},{"$ref":"#/components/parameters/EndingBeforeQuery"},{"$ref":"#/components/parameters/TagsQuery"},{"$ref":"#/components/parameters/BranchesQuery"},{"$ref":"#/components/parameters/AuthorsQuery"},{"$ref":"#/components/parameters/GroupsQuery"},{"name":"branch[]","in":"query","required":false,"deprecated":true,"description":"Deprecated. Use branches[] instead. Filter by git branch (can be specified multiple times using bracket notation, e.g., branch[]=main&branch[]=develop). Each value supports a trailing `*` for prefix search. Each branch value is limited to 250 characters (exact or wildcard).","schema":{"type":"array","items":{"$ref":"#/components/schemas/BranchFilterQueryValue"}},"style":"form","explode":true},{"name":"tag[]","in":"query","required":false,"deprecated":true,"description":"Deprecated. Use tags[] instead. Filter by run tags (can be specified multiple times using bracket notation, e.g., tag[]=tag1&tag[]=tag2)","schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true},{"name":"status[]","in":"query","required":false,"description":"Filter by outcome(s). Each value is a `RecordedTestOutcome` (see schemas). Multiple values OR together. Combine with `flaky` using AND when both are set.","schema":{"type":"array","items":{"$ref":"#/components/schemas/RecordedTestOutcome"}},"style":"form","explode":true},{"name":"flaky","in":"query","required":false,"description":"Filter by flaky status. When true, returns only flaky tests. When false, returns only non-flaky tests. When omitted, returns all tests regardless of flaky status. Can be combined with status filter using AND logic (e.g., status[]=passed&flaky=true returns only flaky passed tests).","schema":{"type":"boolean"}},{"name":"annotations","in":"query","required":false,"description":"Filter by test annotations. The parameter value must be a JSON-stringified array of objects: `[{ \"type\": \"string\", \"description\": \"string\" | [\"string\"] or null }]`. description is optional; omit or set to null to match any value for that annotation.","schema":{"type":"string"}},{"name":"group[]","in":"query","required":false,"deprecated":true,"description":"Deprecated. Use groups[] instead. Filter by run group (can be specified multiple times using bracket notation, e.g., group[]=group1&group[]=group2)","schema":{"type":"array","items":{"type":"string"}},"style":"form","explode":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestResultsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.currents.dev/api/resources/test-results.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
