> For the complete documentation index, see [llms.txt](https://docs.testery.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.testery.io/get-to-know-testery/alerts.md).

# 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="/files/a6HFrpJYLYwVDiMfgrD4" 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.testery.io/get-to-know-testery/alerts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
