> ## Documentation Index
> Fetch the complete documentation index at: https://momentic.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Emit custom outputs to JUnit reports

> Capture values from your test runs and expose them in generated JUnit reports.

Declare `outputs` in a test file to surface values (environment variables,
extracted data, templated expressions) in the generated report.

## 1. Declare outputs

```yaml output-to-junit.test.yaml theme={null}
fileType: momentic/test/v2
id: output-to-junit
url: https://example.com
outputs:
  - name: PLAN_OUTPUT
    value: "{{ env.PLAN }}"
steps:
  - javascript: setVariable("PLAN", "team")
```

## 2. Run with the JUnit reporter

```bash theme={null}
npx momentic run --reporter junit output-to-junit.test.yaml
```

## 3. Read the report

The output appears in the `testOutputs` property:

```xml theme={null}
<testcase name="output to junit" time="2.833">
  <properties>
    <property name="filePath" value="output-to-junit.test.yaml"/>
    <property name="id" value="f5581d81-..."/>
    <property name="testOutputs">{"PLAN_OUTPUT":"team"}</property>
  </properties>
</testcase>
```

## Related

* [Variables](/core-concepts/variables)
* [`momentic run`](/cli-reference/momentic/commands/run)
