# Export a JUnit report for your CI to read

Get the JUnit XML, the HTML report and the JSON report of a run so a build server can keep them.

Every run Silan makes writes a JUnit file, an HTML report and a JSON report into its run folder. This guide gets those files out of a run so your build script can keep them as test results and artifacts.

Time: about 5 minutes.

You need:

- A flow, for example the one from [Write and run a flow](/guides/write-and-run-a-flow/).
- The Silan app open on the Mac, with the device set up. The engine runs inside the app, and a person's app window must be on the Mac. Headless use with no app window is not supported yet.

## Steps

1. Open **Flows**, open your flow and press **Run once**. Pick the device and wait for the run to end.

2. Open the run. The run page shows the verdict, the picture from the moment a step failed, the timeline and the steps.

3. Open the run's ⋯ menu and press **Download report…**. Choose a folder. Silan saves three files there.

   | File | What it holds |
   |---|---|
   | `junit.xml` | JUnit XML: one test case per step with its time and, on failure, the message. Most CI servers read this format and show it as a test tab. |
   | `index.html` | The same report the app shows, with every step's picture embedded, so one file travels on its own. |
   | `report.json` | The run as data: verdict, steps, timings and findings, for your own scripts. |

4. If a script collects the files instead, press **Copy run id** in the same menu. The run folder is `~/Library/Application Support/Silan/runs/<run id>/`, and it also holds `timeline.json` and a `media/` folder of pictures.

5. In your build script, keep `junit.xml` as a test result and `index.html` as an artifact.

## The command line

The `silan run` command is meant to run a flow from Terminal, bind its role to a device and write the three files where you ask, with exit code 0 only when the run passed. On the current release it answers "the scenario engine is not available in this engine" (seen 4 Nov 2026), so it cannot be used yet. The exit codes below are the design, not a proof.

| Code | Meaning |
|---|---|
| 0 | the run passed |
| 1 | the run failed, or it was stopped |
| 2 | wrong arguments |
| 3 | no engine answers (the app is not open) |
| 4 | the key was refused |

## If something goes wrong

- **The menu has no Download report…** The run has not ended yet. Wait for the verdict.
- **The run waits and never starts.** The device is busy with another run or an agent task. The run page says which run it waits for and when it gives up.
- **The build server has no app window.** Silan needs the app running on the Mac today. A headless station is planned, so a Mac with a signed-in user is the build agent for now.

:::note[Proof]
The run folder files were proved on an iPhone 11 (iOS 27) on a cable, 14 Oct 2026, by a Silan worker: run `run_5hvm668trq` wrote `junit.xml`, `report.json` and an `index.html` of 146,555 bytes with 8 pictures. Source: verify-silan feature map, test-runs, and use-case facts, 8b. The `silan run` command was tried on the current release on 4 Nov 2026 and did not run.
:::