# Upload Test Run for Analysis

If you'd like to upload a test run for reporting purposes, to generate an AI-driven analysis, or to kick off alerts. You can do so either from the UI or from the CLI.

You will want to have a copy of your test run output in JUnit XML format. To generate this for your framework, see our various Framework Specific Guidance.

* [Updating TestNG Tests to Output in JUnit XML Format](https://docs.testery.io/framework-specific-guidance/testng/updating-testng-tests-to-output-in-junit-xml-format)
* [Updating Cypress Tests to Output in JUnit XML Format](https://docs.testery.io/framework-specific-guidance/cypress/updating-cypress-tests-to-output-in-junit-xml-format)

## Upload Test Run (UI Option)

1. Navigate to [https://testery.app/testery/test-runs](https://testery.app/tendersnyder/test-runs).
2. Click `Upload Test Run`.
3. Select your Project and Environment and then click Choose File to upload your JUnit XML.

<figure><img src="https://4041872331-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MK0kYmwONk3GqQ8OhVA%2Fuploads%2Fgit-blob-ad64f7a1fe25ca11b19aae0182d620fc21b1facd%2FUpload.png?alt=media" alt=""><figcaption></figcaption></figure>

## Upload a Test Run (CLI Option)

Ensure you have the Testery CLI installed:

```bash
pip install testery
```

Once installed, you can use the following command to upload your test results to Testery:

```bash
testery upload-test-run\
  --environment-key develop \
  --project-key Your_Project_Name \
  --path target/surefire-reports/junitreports/junit.xml
```

Replace `Your_Project_Name` with your specific project name and adjust the `--path`option to point to the location of your JUnit XML file generated by TestNG.

If your junit.xml file is large, you should consider compressing it using .gz format
