> For the complete documentation index, see [llms.txt](https://docs.sealights.io/knowledgebase/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sealights.io/knowledgebase/whats-new/march-2025/quality-gates-flexible-failure-criteria.md).

# Quality Gates - Flexible Failure Criteria

SeaLights has introduced significant enhancements to its Quality Gate feature, providing greater flexibility and accuracy in evaluating build quality.&#x20;

## Threshold For Acceptable Failure Rates

One key update is the addition of a new option for defining failure thresholds. Alongside the existing "No Failures" setting, you can now choose "Percentage of Failures". This allows you to set a maximum acceptable percentage of failed tests, catering to projects with varying risk tolerances.&#x20;

<figure><img src="https://3871776571-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTqMveDrJ1pB6OErwHvF0%2Fuploads%2FweuBdAaJ3kimX2h3VjLC%2FScreenshot%202025-03-13%20at%2014.33.59.png?alt=media&amp;token=a613128a-ffa5-40e4-874b-42440eb7561c" alt=""><figcaption><p>Set a maximum acceptable percentage of failed tests</p></figcaption></figure>

This new option allows you to define a threshold for acceptable failure rates. The Quality Gate will pass if the percentage of failed tests is below the defined value. This option provides more flexibility and can be tailored to projects with varying risk tolerance. You define the acceptable percentage. You can apply this to all test stages or specific ones.

## New Method For Counting Failed Tests

SeaLights now offers a more precise method for counting failed tests, available upon customer request.

* **Current method  "All Results":** counting every test run, potentially inflating the failure count if a test was run multiple times.&#x20;
* **New method "Latest Result":** counting only the latest result for each unique test, providing a more accurate representation of actual failures. For example, if a test fails on its first run but passes on a subsequent run, only the passing result will be counted.&#x20;

This change affects all applications in the account, and the setting is currently managed manually with the help of your SeaLights customer success representative.&#x20;

***

{% hint style="info" %}
Dive deeper into these changes by reading the full [Quality Gates](broken://pages/AHu8zgZGCxHK5mnUsp9R) document.
{% endhint %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sealights.io/knowledgebase/whats-new/march-2025/quality-gates-flexible-failure-criteria.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
