# Test Data Import

{% embed url="<https://www.youtube.com/watch?v=Fqfuf18upd0>" %}
Ddosify Test Data Import Feature
{% endembed %}

Import your CSV-formatted Test Data into the Ddosify Platform and incorporate it into your scenarios for more realistic testing experiences.

#### Test Data Creation

1. Navigate to the Test Data listing page within the Ddosify App, and find the 'Upload CSV' button situated at the top-right corner of the page.

   <figure><img src="https://2539979715-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FugegoRCn84wtxrIelgft%2Fuploads%2FOUD99QJx3IOnfAEPMGn1%2Fimage.png?alt=media&#x26;token=73c90d79-04d5-4dba-b88f-9730532e4786" alt=""><figcaption><p>Test Data Listing Page</p></figcaption></figure>

2. Once you've selected the CSV file on your computer, you will be prompted to indicate whether the first row contains column headers or not. Although you can rename the column headers later, it's crucial to inform Ddosify at this stage, as it will affect how the first row of the CSV is processed.

   <figure><img src="https://2539979715-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FugegoRCn84wtxrIelgft%2Fuploads%2FwQFi0EnY7GUdnq0Mvdly%2Fimage.png?alt=media&#x26;token=39053e38-527d-4284-9ffb-a41e20a57d47" alt=""><figcaption></figcaption></figure>

3. Upon uploading the CSV, you can configure the metadata, modify column headers, remove unwanted columns, and assign data types to columns. The configurations are detailed below:\
   \
   **Settings**

   * **Name:** Provide a unique identifier for this test data.
   * **Order:** Choose between 'Random' or 'Sequential'. In 'Random' mode, Ddosify selects and sends test data randomly for each iteration. In 'Sequential' mode, Ddosify reads and sends test data line by line.
   * **Skip Empty Line:** Ddosify will skip any empty rows in the CSV file if enabled.
   * **Allow Quota:** Enable this option if a quote may appear in an unquoted field, and a non-doubled quote may appear in a quoted field. By default, this is set to 'false'.

   **Data Preview**

   * Ddosify displays the first 10 rows of the CSV as a preview. In this section, you can change the column header names. Keep in mind that you will use these header names in the test scenario for data injection.
   * By disabling the 'Include Header' option, you can exclude a column, and Ddosify will not import it.
   * Lastly, assign a data type to each column to ensure proper formatting. For instance, prevent sending integer values as strings by configuring them here.

   <div><figure><img src="https://2539979715-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FugegoRCn84wtxrIelgft%2Fuploads%2FhwLNIhkISQB2xoTA8xa3%2Fimage.png?alt=media&#x26;token=695088e8-9efe-4b0e-bf0a-9bcb661dc96b" alt=""><figcaption><p>Ddosify Test Data Creation Modal 1</p></figcaption></figure> <figure><img src="https://2539979715-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FugegoRCn84wtxrIelgft%2Fuploads%2F1JCCqKepmBOb39bZtiQq%2FScreenshot%202023-04-17%20at%2018.11.25.png?alt=media&#x26;token=b71ada39-5bbb-4086-8402-afea33d4f977" alt=""><figcaption><p>Ddosify Test Data Creation Modal 2</p></figcaption></figure></div>

#### Incorporate Test Data into Tests

1. In the Ddosify App, go to the Test Suite and choose the Test Data you previously created using the dropdown menu in the top-right corner of the Test Suite. You have the option to attach multiple Test Data to a single test.

   <figure><img src="https://2539979715-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FugegoRCn84wtxrIelgft%2Fuploads%2FzHYlOL6suvoQjpNSsTNf%2FScreenshot%202023-04-17%20at%2018.16.35.png?alt=media&#x26;token=e1f90314-2163-423c-b1de-f1268d7d9c0d" alt=""><figcaption><p>Attach a Test Data </p></figcaption></figure>
2. Utilize the `{{data.test_data_name.header_name}}` format to insert test data into one of the following locations: URL, headers, query parameters, or authentication.

   <figure><img src="https://2539979715-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FugegoRCn84wtxrIelgft%2Fuploads%2FeF8Dia1g9wURWCztlzcF%2Fimage.png?alt=media&#x26;token=4b0bf66c-ac32-4ef5-8638-946fa08584c2" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ddosify.com/ddosify/performance-testing/test-data-import.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
