> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/resilience-testing/load-testing/notifications-and-reports.md).

# Notifications and Reports

Get notified when a load test run starts, completes, fails, or is stopped, and read, download, or share the run report

A load test run can tell you when it starts and when it ends, and every run has a report you can read in Harness or share as a PDF. Notifications come from a **notification rule** that watches the load tests you choose. Reports are built from the metrics of each run.

{% hint style="info" %}
**FEATURE FLAG**

Load Testing is behind a feature flag (`CHAOS_LOAD_TESTING_ENABLED`). Contact your Harness sales representative to enable it for your account.
{% endhint %}

***

## What you will learn from this topic <a href="#what-you-will-learn-from-this-topic" id="what-you-will-learn-from-this-topic"></a>

* **Which run events you can be notified about:** The four load test run events and the run status that triggers each one.
* **How to create a notification rule:** The steps to select load tests, events, and channels.
* **What a notification contains:** The run details in the message and the PDF report that Harness attaches.
* **How to read and download the run report:** The sections of the report page and how to save it as a PDF.

***

## Before you begin <a href="#before-you-begin" id="before-you-begin"></a>

* **A load test:** Go to [Create a Load Test](https://developer.harness.io/resilience-testing/load-testing/create-a-load-test.md) to create one.
* **A notification channel:** At least one channel, such as email, Slack, or Microsoft Teams, at or above the project scope. Go to [Configure new channels](https://developer.harness.io/harness-platform/use-harness-platform/notifications-alerts-and-banners/notifications/configure-notifications.md#configure-new-channels) to create one.
* **Permissions:** Permission to manage notification rules in the project, and view permission on load tests.

***

## Load test run events <a href="#load-test-run-events" id="load-test-run-events"></a>

A notification rule for load tests can watch four events. Each event matches a run status.

| Event                       | Sent when                                                                                                              | PDF report attached |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ------------------- |
| **Load Test Run Started**   | The run moves to **Running** and starts sending traffic.                                                               | No                  |
| **Load Test Run Completed** | The run ends **Finished**. This includes runs that crossed a threshold without the **Abort on Fail** option.           | Yes                 |
| **Load Test Run Failed**    | The run ends **Failed**, for example because the infrastructure or the script failed.                                  | Yes                 |
| **Load Test Run Stopped**   | The run ends **Stopped**, either because someone stopped it or because a threshold with **Abort on Fail** was crossed. | Yes                 |

Harness sends each event at most once per run, even when the run status is reported more than once.

{% hint style="info" %}
A run that crosses a threshold ends **Finished** and sends **Load Test Run Completed**, not **Load Test Run Failed**. To be notified about crossed thresholds, include **Load Test Run Completed** in the rule and check the error codes in the attached report. Go to [Analyze Load Test Results](https://developer.harness.io/resilience-testing/load-testing/analyze-results.md) to read how thresholds affect the run status.
{% endhint %}

***

## Create a notification rule <a href="#create-a-notification-rule" id="create-a-notification-rule"></a>

Load test notification rules are set up in the project that contains the load tests.

1. In your project, select **Project Settings**, and then select **Notifications Management**.
2. On the **Rules** tab, select **New Notification**.
3. On **Overview**, enter a name for the rule, and then select **Continue**.
4. On **Resources**, set **Select Resource Type** to **Load Testing**, and then select the load tests that the rule watches. The list shows each load test with its type, such as K6, Locust, or JMeter. Select **Continue**.

   ![The Resources step with Load Testing selected and a list of load tests to choose from](https://3217710372-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRmV5EkLS9r45VPaoUnJZ%2Fuploads%2Fgit-blob-b6727c65d36a829c2800180722bd4229a3ffdc5c%2Fload-test-notification-resources.png?alt=media)
5. On **Conditions**, select **Add Condition**. Enter a **Condition Name**, open **Add Events**, select the events you want, and then select **Apply**. Select **Continue**.

   ![The Create Condition dialog with the four load test run events](https://3217710372-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRmV5EkLS9r45VPaoUnJZ%2Fuploads%2Fgit-blob-41cf242efe496e20c45acc446b130366db57a716%2Fload-test-notification-events.png?alt=media)
6. On **Channels**, select the channels that receive the notification. Keep **Enable on Save** turned on to start the rule as soon as you save it.
7. Select **Submit**.

The rule sends notifications for events that happen after you save it. To change the load tests, events, or channels later, edit the rule from the **Rules** tab.

{% hint style="warning" %}
A channel that targets a user group sends nothing until that group has a notification preference for the channel type. Harness does not report an error, so the rule looks correct but no notification arrives. Go to [Notification channels and user groups](https://developer.harness.io/harness-platform/use-harness-platform/notifications-alerts-and-banners/notifications/centralised-notification.md#notification-channels-and-user-groups) to check the setup.
{% endhint %}

***

## What a notification contains <a href="#what-a-notification-contains" id="what-a-notification-contains"></a>

Every notification describes the run that sent it:

* **Run details:** The load test name, run number, status, who started the run, when it started and ended, and a link to the load test.
* **Load configuration:** Target users, spawn rate, ramp-up, planned duration, number of workers, target URL, and script source.
* **Performance summary:** Total requests, failures, error rate, average and peak requests per second, peak concurrent users, and the average, minimum, maximum, P50, P95, and P99 response times.
* **Endpoint details:** One row per endpoint with its requests, failures, error rate, and response times.

**Load Test Run Started** is sent as soon as the run starts, so it has no performance results yet.

### The attached PDF report <a href="#the-attached-pdf-report" id="the-attached-pdf-report"></a>

For **Load Test Run Completed**, **Load Test Run Failed**, and **Load Test Run Stopped**, Harness attaches a PDF report named after the load test and the time the report was created. The PDF has these sections:

| Section                 | Contents                                                                                                                                                          |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Report Information**  | Run number, creation time, source, status, and error rate.                                                                                                        |
| **Run Details**         | Account, organization, and project IDs, the load test and run IDs, description, tags, tool, infrastructure, who ran it, and when.                                 |
| **Load Configuration**  | The users, spawn rate, ramp-up, duration, workers, target URL, script source, and cleanup policy the run used.                                                    |
| **Performance Summary** | Requests, failures, error rate, throughput, and response time percentiles for the whole run.                                                                      |
| **Endpoint Details**    | The per-endpoint table.                                                                                                                                           |
| **Error Details**       | The errors recorded against the run, such as a crossed threshold, with their code, message, and severity. This section appears only when the run recorded errors. |

The PDF contains tables only. Charts, check results, AI Insights, and the trend comparison appear only on the report page in Harness.

The notification is still sent when the PDF cannot be attached. Harness does not attach a PDF larger than 5 MB.

***

## Read the run report <a href="#read-the-run-report" id="read-the-run-report"></a>

To open the report for a run, open the run and select **View Report**.

![The report page for a finished JavaScript load test run, with the Download Report button](https://3217710372-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRmV5EkLS9r45VPaoUnJZ%2Fuploads%2Fgit-blob-53961555b85052ca8114970a419f237856aa7621%2Fload-test-run-report.png?alt=media)

The report page has these sections, from top to bottom:

* **About This Test:** The test name, engine, infrastructure, status, who started the run, time elapsed, and the load the run applied, such as users, duration, and peak virtual users.
* **Golden Signals:** Total requests, requests per second, average response time, error rate, P50, P95, and P99.
* **AI Insights:** A written analysis of the run, when AI Insights is available for your account.
* **Checks:** The pass rate and the passed and failed count for each check, for tests that define checks.
* **Charts:** Active users, requests and errors per second, the response time of each endpoint over time, and a response time histogram.
* **Run Summary:** Failures, peak requests per second, peak concurrent users, start and end time in UTC, spawn rate, script source, and cleanup policy.
* **Endpoint Details:** Requests, failures, error rate, and latency in milliseconds for each endpoint, with an aggregated row. Columns that the engine does not measure are left out.
* **Trend Analysis:** How this run compares with earlier runs of the same load test.
* **Notes:** The notes added to the run, when there are any.

### Trend analysis <a href="#trend-analysis" id="trend-analysis"></a>

**Trend Analysis** compares the run with up to 10 earlier runs of the same load test. An earlier run is included when it ended **Finished**, **Stopped**, or **Failed** and sent at least one request. The section does not appear for the first run of a load test, or when no earlier run qualifies.

The section shows two comparisons:

* **vs previous run:** The change from the most recent earlier run.
* **vs average of the last runs:** The change from the average of all the earlier runs in the trend. This comparison appears when there are at least two earlier runs.

Each comparison reports the change in requests per second and in P95 response time as a percentage, and the change in error rate in percentage points. A table below lists each run in the trend, with the reported run highlighted.

### Download the report <a href="#download-the-report" id="download-the-report"></a>

Select **Download Report** at the top of the report page. Harness opens the print dialog of your browser with the report laid out for printing. Choose **Save as PDF** as the destination to save the file.

The downloaded report contains everything on the report page, including the charts. It is a different file from the PDF that is attached to notifications.

***

## Troubleshooting <a href="#troubleshooting" id="troubleshooting"></a>

<details>

<summary>No notification arrives</summary>

Check these in order:

* **The rule is enabled:** On the **Rules** tab, confirm that the rule is turned on.
* **The load test is selected:** Edit the rule and confirm that the load test appears on the **Resources** step.
* **The event matches the outcome:** A run that crossed a threshold without **Abort on Fail** ends **Finished** and sends **Load Test Run Completed**. A rule that watches only **Load Test Run Failed** does not fire for that run.
* **The event happened after the rule was saved:** A rule does not send notifications for events that happened before it was saved.
* **The channel can deliver:** A channel that targets a user group needs a matching notification preference on that group.

</details>

<details>

<summary>The notification has no PDF attached</summary>

**Load Test Run Started** never has a PDF, because the run has no results yet. For the other events, the PDF is left out when it is larger than 5 MB or when Harness could not build it. Open the run and select **View Report** to read the report in Harness instead.

</details>

<details>

<summary>The report page has no Trend Analysis section</summary>

The section needs at least one earlier run of the same load test that ended and sent traffic. It does not appear for the first run, or when every earlier run sent no requests.

</details>

***

## Next steps <a href="#next-steps" id="next-steps"></a>

* Go to [Analyze Load Test Results](https://developer.harness.io/resilience-testing/load-testing/analyze-results.md) to read the run page, the charts, and the run statuses.
* Go to [Run in a Pipeline](https://developer.harness.io/resilience-testing/load-testing/run-in-a-pipeline.md) to run load tests as part of a pipeline.
