# Alerts

Alerts enable you to notify your team (or anyone else you want) when test runs pass, fail, or complete with any status. You can send messages to various places like Slack, Microsoft Teams, OpsGenie, or even webhooks.

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

#### Specifying Criteria in Alerts

Testery uses the [SpEL expression language](https://docs.spring.io/spring-framework/docs/3.0.x/reference/expressions.html#expressions-language-ref) syntax for defining criteria in alerts. For example, you can use `environment.key=='foo'` to match a specific environment or `passCount < 100` or `failCount > 100` The following objects/parameters are available for use in expressions:

### Test Run

<table><thead><tr><th width="289.9512195121951">Parameter</th><th width="257">Data Type</th><th data-type="checkbox">Nullable</th></tr></thead><tbody><tr><td>environment</td><td><a data-mention href="#environment">#environment</a></td><td>false</td></tr><tr><td>projectId</td><td>Long</td><td>false</td></tr><tr><td>ended</td><td>Boolean</td><td>false</td></tr><tr><td>priority</td><td>Int</td><td>true</td></tr><tr><td>passCount</td><td>Int</td><td>false</td></tr><tr><td>failCount</td><td>Int</td><td>false</td></tr><tr><td>ignoredCount</td><td>Int</td><td>false</td></tr><tr><td>totalCount</td><td>Int</td><td>false</td></tr><tr><td>timeoutCount</td><td>Int</td><td>false</td></tr><tr><td>totalTestingTime</td><td>Int</td><td>false</td></tr><tr><td>maxRunners</td><td>Int</td><td>false</td></tr><tr><td>hasFlakyTest</td><td>Boolean</td><td>false</td></tr><tr><td>retryFailedTests</td><td>Boolean</td><td>false</td></tr><tr><td>gitRef</td><td>String</td><td>true</td></tr><tr><td>branch</td><td>String</td><td>true</td></tr><tr><td>environmentId</td><td>Long</td><td>false</td></tr><tr><td>testSuiteId</td><td>Long</td><td>true</td></tr><tr><td>statusSetByUser</td><td>Boolean</td><td>false</td></tr><tr><td>includeTags</td><td>List&#x3C;String></td><td>true</td></tr><tr><td>excludedTags</td><td>List&#x3C;String></td><td>false</td></tr><tr><td>runnerConfigurationId</td><td>Long</td><td>true</td></tr><tr><td>testFilters</td><td>List&#x3C;String></td><td>false</td></tr><tr><td>defaultToParallelizeByFile</td><td>Boolean</td><td>false</td></tr><tr><td>testTimeoutSeconds</td><td>Int</td><td>false</td></tr><tr><td>timeoutMinutes</td><td>Int</td><td>false</td></tr><tr><td>recordVideo</td><td>Boolean</td><td>true</td></tr></tbody></table>

### Environment

<table><thead><tr><th width="290.33333333333337">Parameter</th><th width="258">Data Type</th><th data-type="checkbox">Nullable</th></tr></thead><tbody><tr><td>name</td><td>String</td><td>false</td></tr><tr><td>key</td><td>String</td><td>false</td></tr><tr><td>archived</td><td>Boolean</td><td>false</td></tr><tr><td>pipelineStageId</td><td>Long</td><td>true</td></tr><tr><td>url</td><td>String</td><td>true</td></tr></tbody></table>


---

# 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/get-to-know-testery/alerts.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.
