> For the complete documentation index, see [llms.txt](https://docs.currents.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.currents.dev/~/changes/TYKBeqcc7WyqjmgOzWzB/dashboard/automated-reports.md). Agents can also search and read this documentation through its [MCP server](https://docs.currents.dev/~gitbook/mcp).

# Automated Reports

Proactive detection of regressions in tests performance

✨ Currents **Automated Reports** helps teams to proactively identify regressions in test performance and take an action:

* Prevent problems that go unnoticed for weeks
* Reduce the waste of CI resources caused by failed or flaky tests
* Avoid your team's frustration from rerunning unreliable and flaky tests again and again

An unwanted change in a test performance can go unnoticed for a long time, especially for larger teams where multiple contributors change the tests often.&#x20;

When a duration, flakiness, or failure rate change, it can often pass days or weeks before the regression in performance can be noticed. Meanwhile, teams waste time waiting for CI test results to appear, dealing with flaky, non-reliable, or often failing results.

When you integrate your Cypress or Playwright tests suite with Currents, we will start tracking the following metrics:

* The **failure rate** for each spec and test
* Spec files and individual test **duration**
* Spec files and individual tests' **flakiness rate**

With automated reports sent directly to your inbox, you can quickly identify the most expensive tests that waste CI resources and frustrate your team.

* Items with the **highest duration**
* Items with the **highest flakiness rate**
* Items with the **highest failure rate**

<figure><img src="https://3745692499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqmFDEiUa9mr11LUlxDnt%2Fuploads%2FgWMTBC3Fh4cYUkEIhGM6%2Fautomated-reports-001.png?alt=media&amp;token=fd18d6ee-388d-4aff-8227-f5fb58fd1996" alt=""><figcaption></figcaption></figure>

In addition, the report includes spec files and tests that showed a decline in performance compared to the previous period (usually a week):

* Specs / tests with the most significant increase in duration
* Specs / tests with the most significant increase in failure rate
* Specs / tests with the most significant increase in flakiness rate

<figure><img src="https://3745692499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqmFDEiUa9mr11LUlxDnt%2Fuploads%2F6boqW2xysdjNRipCwjDj%2Fautomated-reports-002.png?alt=media&amp;token=6f69f898-4d4a-40ca-8dd1-f52bb88a2696" alt=""><figcaption></figcaption></figure>

### Enabling Automated Reports

To enable the reports open the **Automated Reports** section in the org menu.

<figure><img src="https://3745692499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqmFDEiUa9mr11LUlxDnt%2Fuploads%2F36nVW31v0kUQhTKs9dcU%2Fcurrents-2023-03-07-16.29.58%25402x.png?alt=media&amp;token=5c325597-d129-479f-923f-4fdd44b95daf" alt=""><figcaption><p>Access to the Automated Reports</p></figcaption></figure>

You will then be able to configure the report for each project within the organization.

1. Click “Enable/Disable” to activate the report for the project.
2. Add the emails of report recipients.
3. Add a comma-separated list of tags - only records matching the filter will be included in the report.
4. Add a comma-separated list of author emails - only records matching the filter will be included in the report.
5. Add a comma-separated list of branches - only records matching the filter will be included in the report.
6. Select the preferred time and day for sending the report. The report will be sent weekly on the selected day / time.
7. Click “Save” to apply the changes.

{% embed url="<https://www.loom.com/share/74635779095c4a98afc750fe67b7fcc1?hideEmbedTopBar=true.&hide_owner=true&hide_share=true&hide_title=true>" %}
Automted Reports Configuration
{% endembed %}

Use **Send Test Report** section to send a preview of a report for the selected period.

<figure><img src="https://3745692499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqmFDEiUa9mr11LUlxDnt%2Fuploads%2FaewxurEBtZmKIJGmDPG0%2FScreenshot%202023-10-18%20at%2022.32.04.png?alt=media&amp;token=bd439fc1-abae-465c-abaa-1b5e19da78b9" alt=""><figcaption><p>Automated Reports Configuration</p></figcaption></figure>

### Report Structure

The report structure includes essential data about the report, summaries of overall items recorded during the period, a section focused on individual cypress spec files, and another section focused on individual cypress tests. The report also shows items with the most significant changes in metrics during the reported period compared to the previous period.

#### Header

Essential data - the dates, organization, project details, and filters applied.

#### Summary

Review of overall items recorded during the period: runs and tests.

**Runs Performance**

Both metrics contain a changing trend, indicating how the metrics changed compared to the previous period.

* The Average Run Duration of **+8m 52s** means that the duration of the average runs increased.
* Success Rate of **+3%** means that the success rate increased compared to the previous period.

<figure><img src="https://3745692499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqmFDEiUa9mr11LUlxDnt%2Fuploads%2F781FbAr5kJHorySJnAEH%2Fheader%402x.png?alt=media&amp;token=36df1e07-f012-43d6-9032-7c6eb23ffd5a" alt=""><figcaption><p>Report example: Header and Summary</p></figcaption></figure>

#### Spec Files Performance

Spec Files Performance section focuses on individual cypress spec files, detecting the worst-performing spec files in your suite based on the executions recorded during the reporting period.

Each line item has the following format:

| Spec File                                                                     | Metric                                              |
| ----------------------------------------------------------------------------- | --------------------------------------------------- |
| \<Spec file name> - a link to the detailed performance view for the spec file | The metric value calculated for the reported period |

* **Top 3 Failing Spec Files**

  It presents the files with the highest failure rate. The failure rate is determined by the formula `Failed Executions / Overall Executions.` The `Failed Execution` status is described on the [Spec File Status documentation](https://currents.dev/readme/spec-files/spec-file-status).

  Having spec files with a high failure rate can have a negative impact on the overall development process, increase the risk of regression, and negatively affect confidence in the codebase.
* **Top 3 Slowest Spec Files**

  It presents the files with the longest duration. Break down those tests to reduce the overall duration of your runs with parallelization.
* **Top 3 Flaky Spec Files**

  It presents the files with the highest flakiness rate. The flakiness rate is determined by the formula `Flaky Executions / Overall Executions.` A `Flaky Execution` has at least 1 test detected as flaky, according to the [Flaky Tests Documentation](https://currents.dev/readme/tests/flaky-tests).

<figure><img src="https://3745692499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqmFDEiUa9mr11LUlxDnt%2Fuploads%2FE3n3pX3YIhfI01qxY9mD%2Fspec-files-performance.png?alt=media&amp;token=267d91b5-73ab-4bb8-a457-d2419a38ab5f" alt=""><figcaption><p>Spec Files performance report example</p></figcaption></figure>

#### Tests Performance

Tests Performance section focuses on **individual cypress tests** and shows the worst performers based on the executions reported within the period.

Each line item has the following format:

<table><thead><tr><th width="373.5">Test Title</th><th>Metric</th></tr></thead><tbody><tr><td>&#x3C;Test Title> - a link to the detailed performance view for the test</td><td>The metric value calculated for the reported period</td></tr></tbody></table>

* **Top 3 Failing Tests**

  It presents he tests with the highest failure rate. The failure rate is determined by the formula `Failed Executions + Skipped / Overall Executions.` The `Failed` and `Skipped` statuses are determined according to the [Test Status Documentation](https://currents.dev/readme/tests/test-status).
* **Top 3 Slowest Tests**

  It presents the tests with the longest average duration. Break down those tests to reduce the overall duration of your runs with parallelization.
* **Top 3 Flaky Tests**

  It presents the tests with the highest flakiness rate. The flakiness rate is determined by the formula `Flaky Executions / Overall Executions.` A `Flaky` execution ihas at least 1 test detected as flaky, according to the [Flaky Tests Documentation](https://currents.dev/readme/tests/flaky-tests).

<figure><img src="https://3745692499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqmFDEiUa9mr11LUlxDnt%2Fuploads%2FvxetlyRmfjpJAceMolQP%2Ftests-files-performance.png?alt=media&amp;token=b5bf995e-e5e2-4c29-bf8b-09e22face16f" alt=""><figcaption><p>Tests Performance report example</p></figcaption></figure>

#### Trends Section

The “Trends” section shows the items with the most significant changes in metrics during the reported period compared with the previous period. Currents will detect the items with the highest negative change and list them in the report. For example, when a test’s duration, flakiness rate, or failure drastically increases during the reported week, it will appear in the “Trends” section.

<figure><img src="https://3745692499-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqmFDEiUa9mr11LUlxDnt%2Fuploads%2FdneXD5Nqd0iAo5jOQ6AD%2Fcurrents-2023-03-26-01.06.35%402x.png?alt=media&amp;token=21b06826-400a-4950-92b9-3848e56fb35b" alt=""><figcaption><p>Trends report example</p></figcaption></figure>

Each line item has the following format:

| Spec File / Test Title                                                             | Metric                                              | Change                                                           |
| ---------------------------------------------------------------------------------- | --------------------------------------------------- | ---------------------------------------------------------------- |
| Spec name / Test title - a link to the detailed performance view for the spec file | The metric value calculated for the reported period | The change in the metric’s value compared to the previous period |

Clicking on the item (spec file name or test title) will open the Currents dashboard with a detailed performance view for further investigation.

* **Spec File / Test Failures Trends**

  Lists the spec files with the most significant increase in their **failure rate**. For example:

  | Spec File / Test Title | Failure Rate | Change |
  | ---------------------- | ------------ | ------ |
  | item                   | 29%          | +23%   |

  It means: the *item* had a failure rate of **29%** during the reported period (usually a week), which is a **23%** increase in its failure rate compared to the previous week.
* **Spec File / Test Duration Trends**

  Lists the spec files with the most significant increase in their **average duration**. For example:

  | Spec File / Test Title | Avg. Duration | Change |
  | ---------------------- | ------------- | ------ |
  | item                   | 20.4s         | +16.7s |

  It means: the *item* had an average duration of **20.4 seconds** during the reported period, which is a **+16.7s** increase compared to the previous week.
* **Spec File / Test Flakiness Trends**

  Lists the spec files with the most significant increase in their **flakiness rate**. For example:

  | Spec File / Test Title | Flakiness Rate | Change |
  | ---------------------- | -------------- | ------ |
  | item                   | 61%            | +57%   |

  It means: the *item* had a flakiness rate of 61% during the reported period and is a **+57%** increase, i.e., the flakiness rate increased from 4% to 61% compared to the previous week.


---

# 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.currents.dev/~/changes/TYKBeqcc7WyqjmgOzWzB/dashboard/automated-reports.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.
