Skip to main content
POST
/
v1
/
analysis
/
test-coverage-map
cURL
curl -X POST 'https://api.supermodeltools.com/v1/analysis/test-coverage-map' \
  -H 'Idempotency-Key: <idempotency-key>' \
  -H 'X-Api-Key: <api-key>' \
  -F 'file=@/path/to/your/repo-snapshot.zip;type=application/zip'
{
  "status": "completed",
  "jobId": "abc-123-def",
  "result": {
    "metadata": {
      "totalFiles": 142,
      "testFiles": 28,
      "productionFiles": 114,
      "totalFunctions": 891,
      "testedFunctions": 342,
      "untestedFunctions": 549,
      "coveragePercentage": 38.4,
      "analysisMethod": "static_call_graph_test_reachability",
      "analysisStartTime": "2026-02-09T12:00:00Z",
      "analysisEndTime": "2026-02-09T12:01:00Z"
    },
    "untestedFunctions": [
      {
        "file": "src/services/billing.ts",
        "name": "calculateRefund",
        "line": 89,
        "type": "function",
        "confidence": "high",
        "reason": "No test file calls this function directly or transitively"
      }
    ],
    "testedFunctions": [
      {
        "file": "src/services/billing.ts",
        "name": "calculateTotal",
        "line": 45,
        "type": "function",
        "testFiles": [
          "tests/billing.test.ts"
        ],
        "directTestCallers": 3,
        "transitiveTestCallers": 7
      }
    ],
    "testFiles": [
      {
        "file": "tests/billing.test.ts",
        "testFunctions": 12,
        "productionFunctionsCovered": 8,
        "productionFilesCovered": 3
      }
    ],
    "coverageByFile": [
      {
        "file": "src/services/billing.ts",
        "totalFunctions": 12,
        "testedFunctions": 8,
        "untestedFunctions": 4,
        "coveragePercentage": 66.7
      }
    ]
  }
}

Authorizations

X-Api-Key
string
header
required

API key issued by the control plane for accessing data plane resources.

Headers

Idempotency-Key
string
required

Unique identifier for this request for idempotency and tracing.

Body

multipart/form-data
file
file
required

Zipped repository archive containing the code to analyze.

Response

Test coverage map (job completed)

Async response envelope for test coverage map operations.

status
enum<string>
required

Current status of the job.

Available options:
pending,
processing,
completed,
failed
jobId
string
required

Unique identifier for the job.

retryAfter
integer<int32>

Recommended seconds to wait before polling again.

error
string

Error message (present when status is failed).

result
object

The result (present when status is completed).