You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/product/test-analytics/index.mdx
+48-4Lines changed: 48 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,15 +21,59 @@ Sentry Prevent Test Analytics provides actionable insights into your CI test run
21
21
22
22

23
23
24
-
To use Sentry Prevent Test Analytics, you’ll need to install the [Sentry app](https://github.com/apps/sentry-io) on your GitHub organization or specific repositories. Once installed, choose your JUnit XML Report language and [set your permissions](#permissions-and-repository-tokens) using a repository secret.
24
+
To use Sentry Prevent Test Analytics, you’ll need to install the [Sentry app](https://github.com/apps/sentry-io) on your GitHub organization or specific repositories. Once installed, choose your JUnit XML Report framework and [set your permissions](#permissions-and-repository-tokens) using a repository secret.
25
+
26
+
<Alert>
27
+
**The only test result file format we support is JUnit XML**. Most test frameworks support outputting test results in this format, with some configuration.
28
+
29
+
Each testing framework will have slight differences in the JUnit XML format it outputs, but we aim to support all of them.
30
+
</Alert>
25
31
26
32
**There are two ways to upload your test results:**
27
33
28
34
### 1. Use GitHub Actions to Run Your CI
29
-
Add the `getsentry/prevent-action` script to your CI YAML file.
35
+
If you are already using GitHub Actions, you can use the `getsentry/prevent-action` script to upload your test results.
36
+
37
+
```yaml
38
+
- name: Upload test results to Sentry
39
+
if: ${{ !cancelled() }}
40
+
uses: getsentry/prevent-action
41
+
with:
42
+
token: ${{ secrets.SENTRY_PREVENT_TOKEN }}
43
+
```
44
+
### 2. Use [Sentry Prevent’s CLI](/product/test-analytics/cli/) to Upload Testing Reports
45
+
If you do not use Github Actions, install the Sentry Prevent CLI using `pip install sentry-prevent-cli` (for Python), or use a binary platform.
description: Learn how to use the Sentry Prevent CLI to upload test results to Sentry.
5
+
---
6
+
7
+
## Installation
8
+
9
+
<Alert>
10
+
While the snippets below can be used to download and use the CLI directly, it is highly recommended to perform signature and SHASUM verification to ensure integrity of the CLI before use. See [Integrity Checking the Uploader](/product/test-analytics/cli/#integrity-checking-the-uploader) below for more information.
11
+
</Alert>
12
+
13
+
For `Python`, install the Sentry Prevent CLI using `pip install sentry-prevent-cli`. You need to have `Python3` as the default.
14
+
15
+
```bash
16
+
pip install sentry-prevent-cli
17
+
```
18
+
19
+
For `binary platforms`, use the following commands to download the latest version of the Sentry Prevent CLI.
0 commit comments