Documentation
For developers

Show your test runs on SageOx

Publish your project's end-to-end test runs to SageOx, and anyone can see what passes, what fails, and the screenshots and logs behind each result. Visitors don't need an account to look.

Screenshot to captureA public team home with the Tests card in the right-hand column: one line per public repo, its latest counts (passed, failed, not run) and squares for the last five runs.

Your tests run with Attest, SageOx's open-source end-to-end test engine. You run them on your machine, then publish the finished run with the ox CLI.

Before you start

  • Your repo is public and belongs to a SageOx team set to Public to everyone. Attest is on by default for those teams.
  • You're an admin or owner of that team. Other members can't publish to a public team.
  • You've run ox init in the repo and committed .sageox/. ox init writes the repo's id to .sageox/config.json, and that's how ox attest publish knows where the run goes.
  • You have an Apple Silicon Mac on macOS 14 (Sonoma) or later, or an ARM64 Linux machine with /dev/kvm, and Node.js 22.15 or newer.

Install Attest

From the root of your repo:

terminal
$
$

init writes a sample test under tests/bdd/ and never overwrites your files. If your repo already has a package.json, init leaves it alone and prints the fields to add. Add them, then run npm install.

Set up the sandbox, once per machine

Attest runs each test in its own small virtual machine, called Shuru. Install Shuru for your machine:

terminal
$
terminal
$

Then build the session image. The first build takes about 2 minutes and 1.2 GB, and it's safe to run again.

terminal
$

Run your tests

Commit your changes first. A run from a clean checkout records its commit, and SageOx shows that commit next to the result.

terminal
$
$
run run_mwleejdt-dafe2d05457b0082: passed
report …/tests/bdd/.attest/runs/run_mwleejdt-dafe2d05457b0082/run-report.json

Keep --no-install: an unrelated package named attest is on npm, and the flag makes sure you run your project's copy. The sample runs as is. To write your own scenarios, see the Attest README.

Export the run

Export the finished run into a self-contained folder. Use the run id that attest exec printed. The output folder must be new or empty.

terminal
$

Publish it

Sign in, then publish the export:

terminal
$
$

The ox CLI prints the run's report link, and --open opens it once SageOx has processed the run. --out holds the upload package and a resume journal, so it must sit outside the export. If the upload is interrupted, run the same command again.

Publishing from CI is coming later. For now, publish from your machine.

Before you publish

Everything in a run on a public team is public, including screenshots, logs and failure messages. Run your tests with test accounts and fake data.

SageOx scans each run once, when you publish it, for strings shaped like credentials: cloud keys, GitHub and GitLab tokens, AI provider keys, private keys, passwords in URLs, signed links. It reads the run record (run.json and observations.json), the screen map (screens.json) and every text file in the run, including logs, report pages and SVG drawings.

The scan...Visitors seeMembers see
Finds nothingThe whole run: scenarios, failure messages, screenshots, logs, reportsEverything
Finds a credential-shaped string, finds a file that is neither text nor a picture (a zipped trace, for example), or has no resultThe run's counts (passed, failed, not run), when it ran, its commit, and "Details held back"Everything, plus which file matched

A held-back run also stays out of the history, health and Tests card that visitors see. Your next clean run shows in full. If the scan found a real key, rotate it: members can still read the run.

What the scan can't catch

  • Anything in a screenshot or a screen recording. No scanner reads pixels, and Attest never masks web page screenshots. Look through your screenshots yourself before you publish.
  • Personal data in text, such as names, email addresses, hostnames or home directory paths. The scan looks for credentials, not personal data.
  • Credentials with no recognizable shape, such as a random password in a config file or a key from a vendor the scanner doesn't know.
  • Encoded content, such as base64 blobs or data: URIs inside a file. The scan doesn't decode them, so a credential inside a trace or archive embedded in a report won't be found. (Escaped characters inside JSON files are decoded and scanned; a JSON file over 16 MiB holds the run back.) Keep secrets out of your test runs in the first place.

Fake keys in test fixtures that look real get the run held back too, until the fixture stops showing up in the run.

Take a run down

Open the repo's Runs page, open the run's menu, and choose Delete run. You can delete a run you published. Repo admins and owners can also delete runs. A visitor who already has the run open can keep loading its evidence for a few minutes.

Keep a screenshot for comparison

Attest keeps the verified PNG screenshots from the repo’s newest published run, across all branches, even after 30 days. When a newer run publishes, unpinned screenshots from the previous run expire 30 days after their original publication. If those 30 days have already passed, they expire when the newer run publishes. Logs and report pages expire after 30 days.

A repo owner can open Flows, select the run, choose Manage screen pins, pick a screenshot, and select Pin screenshot. The pin lasts 180 days from pinning. Remove pin deletes the pinned copy immediately. The screenshot stays available if the run is still newest or within its original 30 days. Deleting the run also deletes its pinned screenshots.

See your runs

  • Team home: the Tests card lists each public repo with published runs, its latest counts and its last five runs. Select a repo to open its Flows for the run shown.
  • Repo: open Attest to browse Flows. Use Health for failures, Coverage for gaps, and Runs for publication history.

Anyone can open these pages, signed in or not. Tests from the team's private repos stay members-only.

Search engines index a public repo's Tests page and its runs list. Single run, scenario, health and coverage pages stay out of search results. If the team is hidden from the open-source directory, none of its pages are indexed.

Show a badge in your README

Add a badge that shows your latest test results to your project's README. It links to the repo's Tests page.

  1. Open the repo's page on SageOx and copy the repo_… id from its address.
  2. Paste this into your README, with your id in both places:
[![SageOx tests](https://sageox.ai/api/v1/public/repos/repo_YOUR_ID/attest/badge.svg)](https://sageox.ai/repo/repo_YOUR_ID/attest)

The badge reads the latest run on your default branch:

Badge saysWhen
12/12 passingNo scenario failed. Passed out of every scenario the run selected, still-pending ones included
failingAt least one scenario failed
staleNo run on the default branch in the last 16 hours, whatever the last result was
unknownThe repo is private, has no runs yet, or tests are off for the team

To match other shields.io badges in your README, use the JSON version through shields.io instead: https://img.shields.io/endpoint?url=https%3A%2F%2Fsageox.ai%2Fapi%2Fv1%2Fpublic%2Frepos%2Frepo_YOUR_ID%2Fattest%2Fbadge.json. Both versions refresh within about five minutes of a new run.

What's next