> 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/ai-summary.md).

# AI Summary for Load Tests

Understand the AI-generated summary of a load test, when Harness generates and refreshes it, and what it sends to the model in Harness Resilience Testing

The **Summary** is a short, plain-language description of what a load test does, written by Harness AI from the test definition. It tells someone opening the test for the first time which service it targets, how the load is shaped, and what the script exercises, without reading the script.

{% hint style="info" %}
**LOAD TESTING IS BEHIND A FEATURE FLAG**

Load Testing is behind a feature flag (`CHAOS_LOAD_TESTING_ENABLED`). Contact [Harness Support](mailto:support@harness.io) to enable it.
{% 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>

* Where the summary appears and what it describes.
* When Harness generates the summary, and which changes refresh it.
* What Harness sends to the model, and what it removes first.

***

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

* **Load Testing enabled:** Your account has the `CHAOS_LOAD_TESTING_ENABLED` feature flag.
* **AI features enabled:** Your account has the `CHAOS_AI_RECOMMENDATION_DEV` feature flag, and Harness AI is turned on. Harness reads the Harness AI setting at the project scope first, then the organization, then the account, so a project or organization can turn it off for its own tests.
* **A saved load test:** Harness writes the summary after a save. Go to [Create a load test](https://developer.harness.io/resilience-testing/load-testing/create-a-load-test.md) to create one.

***

## Where the summary appears <a href="#where-the-summary-appears" id="where-the-summary-appears"></a>

The summary appears in two places, marked with the AI icon and the label **Summary**.

* **Load test Overview.** Open a test from **Resilience Testing** > **Load Tests**. The first entry under **About This Test** is the summary, shortened to three lines.

  ![The About This Test panel of a load test, with the Summary entry showing the first three lines of the generated summary](https://3217710372-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRmV5EkLS9r45VPaoUnJZ%2Fuploads%2Fgit-blob-c54131c8e7ae5c7ff75df70a513a1b7afa015b5d%2Fload-test-ai-summary-details.png?alt=media)
* **Load Test Studio.** Select **Edit** on the test. The **Metadata** card on the **Overview** tab shows the full summary beside **Name**, **Description**, and **Tags**.

  ![The Metadata card in the Load Test Studio, with the full summary beside the Name, Description, and Tags fields](https://3217710372-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRmV5EkLS9r45VPaoUnJZ%2Fuploads%2Fgit-blob-bc1748eef83358c7ec9db37de5dc5ecfe6fe3373%2Fload-test-ai-summary-studio.png?alt=media)

The summary is read-only. Harness writes it, and you cannot edit it. Use **Description** for anything you want to say in your own words.

***

## What the summary describes <a href="#what-the-summary-describes" id="what-the-summary-describes"></a>

The summary is at most 120 words, in three or four short sentences of plain text. It covers:

* **Purpose and target:** what the test is designed to do and which service or endpoint it targets.
* **Load shape:** the Load Test Engine, the number of users, ramp, and duration, and whether the test runs on Kubernetes or a Linux VM, using the numbers in the test definition.
* **What the script exercises:** notable requests, checks, thresholds, the container image, and JMeter properties when they are present.

When the test has a **Description**, the model uses it as extra context for intent, without copying it. The summary describes the test as it is configured. It does not report results, latency, or error rates from any run. Go to [Analyze load test results](https://developer.harness.io/resilience-testing/load-testing/analyze-results.md) to read the results and the AI Insights analysis of a finished run.

***

## When the summary is generated <a href="#when-the-summary-is-generated" id="when-the-summary-is-generated"></a>

Harness generates the summary after you create, clone, or save a load test. The save completes first, and the summary is written in the background.

While it is being written, a spinner appears next to **Summary**. The page checks for the new summary every five seconds and shows it as soon as it arrives. Generation has a 45-second limit. If it does not finish in time, or it fails, the previous summary stays in place.

A test that has no summary yet gets one on its next save. After that, Harness writes a new summary only when the parts of the test that the summary describes change.

| A save refreshes the summary when you change                               | A save keeps the current summary when you change only                                         |
| -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| The script or test plan, other than whole-line comments and blank lines    | The **Name**, **Description**, or **Tags**                                                    |
| The Load Test Engine, or whether the test runs on Kubernetes or a Linux VM | The infrastructure or environment you selected                                                |
| Users, ramp, duration, or other load settings                              | Environment variables                                                                         |
| Thresholds                                                                 | Secret variables and properties                                                               |
| The host URL, variables, or properties                                     | The image pull secret                                                                         |
| The container image                                                        | Whole-line comments, such as lines that start with `#` or `//`, and blank lines in the script |

To get a new summary, change and save one of the items in the first column.

Harness does not generate a summary for:

* A load test template.
* A load test that a pipeline step creates on your behalf from a template.
* A load test with nothing to describe yet, that is, no script, no container image, and no load settings.

***

## What Harness sends to the model <a href="#what-harness-sends-to-the-model" id="what-harness-sends-to-the-model"></a>

Harness sends the model the test definition as YAML, with the script or test plan as text. For a Java test uploaded as a `.zip`, it sends the text of the test plan, not the archive. The document is capped at 12,000 characters, so a very long script is summarized from its beginning.

Before sending, Harness removes:

* The test **Name**, **Description**, and **Tags** from the document. The name is sent with the request so the model can refer to the test, and the description is sent separately, as context only, cut at 2,000 characters.
* The infrastructure, environment, service references, environment variables, and image pull secret.
* Variables and properties marked secret, or whose names contain `PASSWORD`, `SECRET`, `TOKEN`, `CREDENTIAL`, `AUTH`, `KEY`, `PRIVATE`, `CERT`, `PEM`, or `PASSPHRASE`.

It also replaces the following with `[REDACTED]`, or removes them from URLs:

* Harness secret expressions, such as `<+secrets.getValue("api_token")>`.
* `Bearer` and `Basic` credentials.
* Values passed to command-line flags such as `--password`, `--token`, and `--api-key`.
* Values assigned to names that contain the words listed above, such as `API_KEY = "..."`.
* User names, passwords, query strings, and fragments in URLs.

{% hint style="warning" %}
**KEEP CREDENTIALS OUT OF THE SCRIPT**

Redaction matches common patterns, not every possible secret. Store credentials as Harness secrets and reference them from variables, rather than writing them into the script.
{% endhint %}

***

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

<details>

<summary>There is no Summary on the test</summary>

Check that your account has the `CHAOS_AI_RECOMMENDATION_DEV` feature flag and that Harness AI is turned on for the project, organization, and account. Then open the test in the **Load Test Studio** and save it. A test without a summary gets one on its next save, including a test created before the feature was available.

</details>

<details>

<summary>The summary did not change after I saved</summary>

The change did not affect what the summary describes. Renaming the test, editing the description or tags, changing the infrastructure, or editing comments in the script keeps the current summary. Go to [When the summary is generated](#when-the-summary-is-generated) for the full list.

</details>

<details>

<summary>The spinner disappeared, but the summary is unchanged</summary>

Generation did not finish within 45 seconds or failed, so Harness kept the previous summary. A test that already has a summary refreshes only on a change from the first column of [When the summary is generated](#when-the-summary-is-generated), so make and save one of those changes to retry.

</details>

<details>

<summary>The summary describes something the test does not do</summary>

The summary is generated by a language model and can be wrong. It is told to use only the numbers and endpoints in the test definition, but a long script is cut at 12,000 characters, and redacted values cannot be described. Rely on the **Load Test Properties** and **Script Preview** on the **Overview** tab for the exact configuration.

</details>

***

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

* Go to [Create a load test](https://developer.harness.io/resilience-testing/load-testing/create-a-load-test.md) to create a test that Harness can summarize.
* Go to [Analyze load test results](https://developer.harness.io/resilience-testing/load-testing/analyze-results.md) to read the generated analysis of a finished run.
* Go to [Load testing key concepts](https://developer.harness.io/resilience-testing/load-testing/key-concepts.md) to review virtual users, load profiles, and thresholds.

{% @harness-feedback/feedback %}
