Reporting
Export flow run results as HTML, PDF, or OpenTelemetry JSON — manually from the UI or programmatically from an After All script.
Two Ways to Export
Atrahasis exposes flow run results through two complementary channels.
- •Manual export: The Action Bar's Export dropdown lets you save HTML, PDF, or OTEL JSON to a file after a run completes. Use this for ad-hoc triage or sharing a single run.
- •Programmatic export: Inside an After All script, the at.export.* API returns the same artifacts as values, so you can POST them to a dashboard, webhook, or storage bucket as part of the run.
Manual Export (Action Bar)
Once a flow run finishes, the Export dropdown becomes active in the Action Bar (next to the Run button). Pick a format and Atrahasis opens a save dialog so you can choose where to write the file.
| Format | Best For | Contents |
|---|---|---|
| Export HTML | Manual review, sharing with teammates | Self-contained HTML with charts, per-step details, anomalies, and assertion results |
| Export PDF | Archival, email reports, print | Static rendered snapshot of the run summary |
| Export JSON | Observability platforms, custom tooling | OpenTelemetry-compatible trace JSON: spans, attributes, timings — machine-readable |
The Export dropdown is disabled while a run is in progress and when there are no results to export.
Programmatic Export (at.export.*)
The at.export namespace is only populated inside After All scripts — calling it from any other context throws "at.export is only available in AfterAll scripts". By the time After All runs, the full run result is in memory, so all three formats can be generated on demand.
| Method | Returns | Sync / Async |
|---|---|---|
| at.export.json() | string (OTEL JSON) | Sync — no await needed |
| at.export.html() | string (full HTML report) | Sync — no await needed |
| at.export.pdf() | Uint8Array (PDF binary) | Async — requires await |
Example — POST a JSON report to a custom endpoint:
var json = at.export.json();
await fetch("https://your-endpoint/results", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: json,
});
console.log("JSON report sent:", json.length, "bytes");Example — POST a PDF binary:
var pdf = await at.export.pdf();
await fetch("https://your-endpoint/report", {
method: "POST",
headers: { "Content-Type": "application/pdf" },
body: pdf,
});
console.log("PDF report sent:", pdf.length, "bytes");Example — Slack webhook on completion:
await fetch("https://hooks.slack.com/services/...", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ text: "Flow run finished!" }),
});Reporting Use Cases
CI / observability pipeline
Send the OTEL JSON from After All to your tracing backend so flow runs land alongside production traces.
Chat notifications
Post a Slack or Discord webhook with a one-line summary so the team sees flow results without opening Atrahasis.
Custom dashboard
POST the HTML or PDF report to your own backend, store it, and link to it from a dashboard or test history view.
Manual triage
Use the manual Export dropdown to grab an HTML report and share it directly with a teammate when investigating a flaky run.