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

# Test Data

**Test Data** is where you keep the values your scripts run against — customer records, account numbers, login details — instead of typing them into every step.

It opens a separate area of Qyrus called **Test Data Management**, with its own breadcrumb and its own screens. You get there from Web Testing, but you are no longer inside it.

## Prerequisites

* An open project
* For the Database and API sources, connection details from whoever runs that system

## Opening Test Data

On the project home page, click **Test Data** in the **Build** group.

![The Test Data Management screen](https://239974709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FycS61vFhJMvvtnJCrDJk%2Fuploads%2Fgit-blob-5c65255b8047f593b80155e1839d0e2b00460374%2Fbuild-testdata-01.png?alt=media)

A red **Data Use Notice** runs across the top:

> Do not enter production or sensitive data. Use only non-confidential, synthetic or anonymized data

## Where your test data comes from

Three cards sit under **Data Source**, and one under **Parameterized Files**.

| Card                    | Use it when                                                                   |
| ----------------------- | ----------------------------------------------------------------------------- |
| **Database**            | The data already lives in a database you can reach                            |
| **API**                 | The data comes back from a web service your team already has                  |
| **Manual**              | You want to type the data in, upload a spreadsheet, or have Qyrus generate it |
| **Parameterized Files** | You want to browse the data sets held against your suites and scripts         |

## Database

Click **Database**. With nothing set up, the screen reads "Currently no connection available".

Open the **Database tables** panel to define one.

![The Database tables panel](https://239974709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FycS61vFhJMvvtnJCrDJk%2Fuploads%2Fgit-blob-70825fc2e0e3de122c72d253f811b33039c2d92c%2Fbuild-testdata-02.png?alt=media)

| Field                             | What it asks for                                  |
| --------------------------------- | ------------------------------------------------- |
| **What's your database type ?**   | Which database you are connecting to              |
| **Connection Name**\*             | A name you will recognise later                   |
| **Connection type ?**             | How to reach it — **Standard(TCP/IP)** by default |
| **Database name**\*               | The database to read from                         |
| **Host name**\*                   | The server it runs on                             |
| **Port number**\*                 | The port it listens on                            |
| **Username**\* and **Password**\* | An account that can read it                       |

The fields marked `*` are required. **Test Connection** checks the details before you commit to them.

If you do not know these values, ask whoever administers the database — they are the same details any database tool needs.

## API

Click **API**. With nothing set up, the screen reads "Currently no connections available".

**Create connection** opens **Create table via API**, which asks only for a \*\*Name \*\*\*.

![Creating a table from an API](https://239974709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FycS61vFhJMvvtnJCrDJk%2Fuploads%2Fgit-blob-826e667556b09d7d2149d560678c07cc499ee59d%2Fbuild-testdata-03.png?alt=media)

## Manual

**Manual** gives you two ways to get data in without a connection.

![The Manual data source](https://239974709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FycS61vFhJMvvtnJCrDJk%2Fuploads%2Fgit-blob-74952462002d70a50d0c967b57772648999eda1e%2Fbuild-testdata-04.png?alt=media)

**Upload a file.** The upload box accepts CSV and Excel files. Its label reads `Upload file(CSV,XLS'/X file format only)`.

**Or build a table by hand.** Click **Create Table**.

![Building a table by hand](https://239974709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FycS61vFhJMvvtnJCrDJk%2Fuploads%2Fgit-blob-951ba77953daa15a7492edade4b9fb7011a22b62%2Fbuild-testdata-05.png?alt=media)

The grid works like a spreadsheet. Columns start as **A** and **B**; the **+** at the end of the header row adds another, and each column header carries icons to rename, sort and remove it.

| Control           | What it is for                                               |
| ----------------- | ------------------------------------------------------------ |
| **Name**\*        | Names the table. Required                                    |
| **Search data**   | Finds a value in a table too big to scan                     |
| **Generate data** | Fills the table with synthetic data instead of you typing it |
| **Export CSV**    | Downloads the table                                          |
| **Save**          | Stores the table                                             |

## Parameterized Files

**Parameterized Files** shows the data sets held against your tests, arranged the way your tests are.

![Parameterized Tables](https://239974709-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FycS61vFhJMvvtnJCrDJk%2Fuploads%2Fgit-blob-25fbd2e4393a10443096504208c0a727b43a7bbd%2Fbuild-testdata-06.png?alt=media)

Choose **Test Labs** or **Sprints**, then a test suite, then a script. The left panel is headed **Parameterized Tables** — "Organize your records in a table view and create a unique data set for your test".

## Using test data in a script

Storing data is only half of it. A step has to be told to read from it, and that is done in the script editor — see [Parameterization](/web-testing/build/parameterization.md).
