Skip to content

Sending results ​

Your tests already create a report. Send that file to Lupin and inspect the result alongside its original evidence.

FROM CI TO CONSOLE

Keep your tools. Connect their output.

Select a step to see what it means in the product.

YOUR CITest report
LUPINRun testsUse the suite you know
01 / 04

Use the suite you know

Playwright, JUnit-compatible runners, k6 and ZAP produce their usual reports.

The upload ​

POST /api/v1/reporter/upload takes a multipart form with one file part and a few optional fields. When the API has REPORTER_SECRET set, send it as a bearer token.

bash
curl --fail-with-body \
  -H "Authorization: Bearer $REPORTER_SECRET" \
  -F file=@results.json \
  -F format=playwright \
  -F runId="$CI_PIPELINE_ID" \
  -F branch="$CI_COMMIT_BRANCH" \
  -F commitSha="$CI_COMMIT_SHA" \
  http://127.0.0.1:8080/api/v1/reporter/upload
See every upload field
FieldPurpose
fileThe report. Exactly one file part.
formatWhich adapter reads it: playwright, junit, allure, k6, zap, ctrf, jest, vitest, pytest or mochawesome. See below for what happens when you omit it.
runIdYour identity for the run. Omit it and the report's own SHA-256 becomes the id, so a re-upload is a replay rather than a second run.
branchShown on the run and used to filter trends.
commitShaThe commit under test.
environmentFree text, such as staging.
startedAt, finishedAtISO 8601 timestamps with seconds, when the report does not carry them.

Declare the format. The declared format wins; without it the file name decides, and the content only decides when neither does. A JUnit file sent as format=playwright is refused with a message saying which format the bytes look like, rather than being parsed into nonsense.

Errors name the problem. A report the adapter cannot read answers INVALID_REPORTER_UPLOAD with the adapter's own reason in details.adapterMessage — for example that a JUnit document contains no test cases — so the fix is in the response.

Playwright ​

Ask Playwright for its JSON reporter, then upload the file:

bash
npx playwright test --reporter=json > results.json

Retries are read from each test's results[] history. A test that failed and then passed on a retry is stored as flaky, not as a pass.

JUnit XML ​

Almost every runner can write JUnit XML: pytest (--junitxml=junit.xml), Maven Surefire, Gradle, Jest with jest-junit, Go with gotestsum --junitfile, and more.

bash
curl -H "Authorization: Bearer $REPORTER_SECRET" \
  -F file=@junit.xml -F format=junit \
  http://127.0.0.1:8080/api/v1/reporter/upload

The parser does not expand external entities, caps failure messages, and treats a truncated or malformed document as a run of unknown status — never as a pass.

Allure ​

For a team moving off Allure. Allure writes one file per result, so join them into one JSON document and send it with format=allure:

bash
jq -s . allure-results/*-result.json > allure.json
curl -H "Authorization: Bearer $REPORTER_SECRET" \
  -F file=@allure.json -F format=allure \
  http://127.0.0.1:8080/api/v1/reporter/upload

Several results with one identity are one test's attempts, and a test whose attempts disagree is flaky, as for Playwright. Allure lists attachments by file name only, so none are carried.

Health reports ​

SARIF, coverage (lcov, Cobertura, JaCoCo and others), SBOM, VEX, mutation, axe and eval reports are not test runs. They go to the repository health door with lupin upload, which names every format it accepts.

k6 and OWASP ZAP ​

The same request with format=k6 (a k6 summary JSON) or format=zap (a ZAP XML report). Each declared k6 threshold becomes a result, evaluated against the metric it names, so a script that blew its latency budget fails even when every request succeeded. Each ZAP alert becomes a result: Informational is skipped, Low to High is failed, and a risk code this build does not recognise is unknown rather than clean.

In CI ​

A GitHub Actions step, run even when the tests failed:

yaml
- name: Upload results to Lupin
  if: always()
  run: |
    curl --fail-with-body \
      -H "Authorization: Bearer ${{ secrets.LUPIN_REPORTER_SECRET }}" \
      -F file=@results.json -F format=playwright \
      -F runId="${{ github.run_id }}-${{ github.run_attempt }}" \
      -F branch="${{ github.ref_name }}" -F commitSha="${{ github.sha }}" \
      "${{ vars.LUPIN_URL }}/api/v1/reporter/upload"

if: always() matters: the run you most need to see is the one that failed.

Live events instead of a file ​

A reporter that streams while the suite runs can post events to POST /api/v1/reporter/events — run:start, test:begin, test:end, run:end — and the dashboard updates over server-sent events as they arrive. The event contracts are in packages/shared-contracts/src/schemas/reporter-events.ts, and the full route list is in docs/openapi.json.