> For the complete documentation index, see [llms.txt](https://docs.ddosify.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ddosify.com/ddosify/performance-testing/correlation.md).

# Correlation

{% embed url="<https://www.youtube.com/watch?v=1knf6Ou_phY>" %}

Correlation allows you to link steps together. For instance, you can design a test scenario to evaluate your authentication process by taking the following steps: First, obtain the authentication token from the response of a login request. Then, insert the extracted token into subsequent requests. This short example demonstrates how correlation works in practice.

#### Capture Value from the Response

1. Click the ***More*** button located to the right of the step and open the "Step Details" section.

   <figure><img src="/files/DiIn6jSfXnC8Hrvfd8EM" alt=""><figcaption><p>Step Detail Button </p></figcaption></figure>
2. To capture a value from the response of a step, go to the "Capture" tab in the "Step Detail" section and follow these steps:

   * Give a unique name to a variable that you will use to access the captured value in subsequent requests.
   * Select whether to extract the value from the response body or response headers.
   * Choose the appropriate extraction type based on where you extract the value.
   * If you're extracting from the response body, you can use JSON path, XML path, or regular expressions to extract the value.
   * If you're extracting from response headers, you can extract the entire header value or a part of the header value by using regular expressions.

   <div><figure><img src="/files/VBkvO9ExFzTSUBddNGQp" alt=""><figcaption></figcaption></figure> <figure><img src="/files/ty5qZ0J12safN2GgJid1" alt=""><figcaption></figcaption></figure></div>

#### Use Captured Value in Requests

You can use the format {{captured\_variable\_name}} to insert a value that was previously captured into various parts of subsequent requests. This includes the URL, the request body, query parameters, headers, and authentication information.

<figure><img src="/files/YezV8RLIyEidMMVAhLB1" alt=""><figcaption></figcaption></figure>
