Ingestion

Jest

Send Jest test results to RunPilotAI using the built-in JSON reporter.

Configure Jest JSON reporter

json
{
  "jest": {
    "reporters": [
      "default",
      ["jest-junit", {}],
      "json"
    ],
    "testResultsProcessor": "jest-sonar-reporter"
  }
}

Or run Jest with the --json flag:

bash
npx jest --json --outputFile=jest-results.json

Send results via curl

bash
curl -s -X POST https://runpilotai.com/api/ingest/jest \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_INGEST_KEY" \
  -d @jest-results.json

GitHub Actions example

yaml
- run: npx jest --json --outputFile=jest-results.json

- name: Send to RunPilotAI
  if: always()
  run: |
    curl -s -X POST https://runpilotai.com/api/ingest/jest \
      -H "Content-Type: application/json" \
      -H "x-api-key: ${{ secrets.RUNPILOT_API_KEY }}" \
      -d @jest-results.json