# Scenario Flow

<figure><img src="https://2539979715-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FugegoRCn84wtxrIelgft%2Fuploads%2Fq4gYxerIYr71UdxARYN9%2Fimage.png?alt=media&#x26;token=45f59791-797e-4223-9c8e-520333f4cf09" alt=""><figcaption><p>Ddosify Scenario Builder</p></figcaption></figure>

### What is Scenario?

In essence, a scenario represents a series of steps designed to mimic the actions of an end-user. This end-user could be a real person using a browser to access your website or another software program that sends API requests to your endpoints.

For instance, imagine you own an e-commerce business and wish to evaluate the performance of the following user flow:

1. User visits the home page
2. User logs in
3. User adds a product to the shopping cart

To accomplish this, you must construct a scenario containing these 3 steps. It is essential to ensure that the steps are executed in the correct order, as the sequence is critical to accurately simulating the end-user's experience.

<figure><img src="https://2539979715-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FugegoRCn84wtxrIelgft%2Fuploads%2FqHmXypPMWjqTlT2VLsb1%2Fimage.png?alt=media&#x26;token=19ddc4b5-24af-4ce9-9433-48881ba21d42" alt=""><figcaption><p>Ddosify Load Testing Example Scenario</p></figcaption></figure>

### What is a Step?

Step represents the individual network request.&#x20;

* **Step Name** is not mandatory. But it is nice to have since you can easily distinguish your steps on the Test Report page if you provide it.
* **Target** is where you supply network protocol and URL.
* **Method** is the HTTP method.

{% hint style="warning" %}
**Caution:** Don't put query parameters in the target field. There is a section for query parameters in the [Step Details](#step-details) section.

For example, instead of **`http://example.com/search?q=term`** write **`http://example.com/search`** and put **`q=term`** parameter to the key-value form in [Step Details](#step-details) modal.
{% endhint %}

* Click the **New Step** button if you would like to add another step to the scenario.
* Click the 'More' (three-dot icon at the right) button to provide [Step Details](#step-details).

<figure><img src="https://2539979715-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FugegoRCn84wtxrIelgft%2Fuploads%2FjtlnBXa2poTybuABhJyV%2Fimage.png?alt=media&#x26;token=f178eaa3-1a13-48e1-93b3-0166736b15f5" alt=""><figcaption></figcaption></figure>

#### Step Details

You can provide query parameters, request headers, payload, authentication, and network details of the request here. You can also [Capture Variables](https://docs.ddosify.com/ddosify/performance-testing/correlation) and create [Assertion](https://docs.ddosify.com/ddosify/performance-testing/assertion) logic in Step Detail.

<figure><img src="https://2539979715-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FugegoRCn84wtxrIelgft%2Fuploads%2FPmwpem1lzoRBpF3QkH4M%2Fimage.png?alt=media&#x26;token=e9135bcc-14d4-45be-a5e8-345024bbe512" alt=""><figcaption></figcaption></figure>

#### Other Important Concepts on Scenario Builder

* [Parametrization](https://docs.ddosify.com/ddosify/performance-testing/parametrization)
* [Test Data](https://docs.ddosify.com/ddosify/performance-testing/test-data-import)
* [Environments](https://docs.ddosify.com/ddosify/performance-testing/environment-variables)
* [Correlation](https://docs.ddosify.com/ddosify/performance-testing/correlation)
* [Assertion](https://docs.ddosify.com/ddosify/performance-testing/assertion)
* [Debugging](https://docs.ddosify.com/ddosify/performance-testing/debugging)
* [Postman Import](https://docs.ddosify.com/ddosify/performance-testing/postman-import)

&#x20;
