# 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](/framework-specific-guidance/testng/updating-testng-tests-to-output-in-junit-xml-format.md)
* [Updating Cypress Tests to Output in JUnit XML Format](/framework-specific-guidance/cypress/updating-cypress-tests-to-output-in-junit-xml-format.md)

## 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="/files/UbZc1x1qemqGRnqrtS9c" 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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.testery.io/how-to/upload-test-run-for-analysis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
