---
title: "Data Source"
section: "Data Source"
description: "Data Source holds the test data and connections of a SmartestQA project: keys ({{ds:key}}), Excel/CSV datasets, database and Kafka connections, and encrypted secrets."
url: https://docs.smartestqa.ai/en/data-source.html
audience: [customer, admin]
updated: 2026-11-08
keywords: "data source test data variables keys datasets excel csv database jdbc kafka connection encrypted secret password environment ds excel"
---
# Data Source

Data Source is where a project keeps its test data and its connections to outside systems: named values (keys), Excel or CSV datasets, and database and Kafka connections. Test steps read them by name, so a value or a password changes in one place.

## In short

**On this page you can**

- Keep test data as named keys that steps read with {{ds:key}} .
- Store passwords and tokens encrypted so nobody sees them again.
- Upload Excel or CSV Datasets for data-driven runs.
- Define database and Kafka connections once for every DB and Kafka step.
- Give a key a different value per environment with _DEV, _TEST and _PRP.

**How to use it**

1. Open Data Source in the main menu and pick a tab.
2. In Variables , click New key , name it and set its value.
3. In Connections , add a DB or Kafka connection and click Test Connection .
4. In Automate, insert the key into a step with the data source picker icon.
5. Run the test; if a value is wrong, check the step log and the key’s name.

**At a glance**

- **Where:** Main menu › **Data Source**. Tabs: **Variables**, [**Datasets**](https://docs.smartestqa.ai/en/data-source-datasets.html), **Connections**, each with a count.
- **Who:** Every project member creates and edits. Deleting a key, or a folder that is not empty, needs an [Admin](https://docs.smartestqa.ai/en/company-settings-roles.html). Only the creator of an encrypted value can show it.
- **You need:** A selected project. For DB and Kafka: the server address and a test user that can log in.
- **Time:** A key takes seconds. A tested database connection takes a few minutes.
- **Produces:** **Keys** (`{{ds:key}}`), **datasets** (`{{excel:name}}`), **DB connections** and **Kafka connections**.
- **Used by:** [Automate](https://docs.smartestqa.ai/en/automate.html) steps (any parameter, API, DB, Kafka), [pipelines](https://docs.smartestqa.ai/en/schedule-settings.html#data-loop) that loop over a dataset, and the AI (key names only, never values).
- **Project types:** The same in WEB, MOBILE and DESKTOP projects. DB and Kafka connections are opened from the machine that runs the test, so the server must be reachable from there.

## Start from your question

I want to…

- [Add a test value](https://docs.smartestqa.ai/en/data-source-variables.html#create-key)
- [Store a password safely](https://docs.smartestqa.ai/en/data-source-secrets.html#encrypt)
- [Connect a database](https://docs.smartestqa.ai/en/data-source-connections.html#add-db)
- [Run a test once per Excel row](https://docs.smartestqa.ai/en/data-source-datasets.html#upload)
- [Use another value on TEST](https://docs.smartestqa.ai/en/data-source-variables.html#environments)

Something is wrong

- [Test Connection fails](https://docs.smartestqa.ai/en/data-source-troubleshooting.html#fix-test-connection-failed)
- [Test Connection works, the run fails](https://docs.smartestqa.ai/en/data-source-troubleshooting.html#fix-works-in-test-fails-in-run)
- [“Could not resolve DB data source”](https://docs.smartestqa.ai/en/data-source-troubleshooting.html#fix-db-key-no-rows)
- [I can’t delete a key](https://docs.smartestqa.ai/en/data-source-troubleshooting.html#fix-delete-key)
- [All Data Source problems](https://docs.smartestqa.ai/en/data-source-troubleshooting.html)

How does it work?

- [How a step reads a key](https://docs.smartestqa.ai/en/data-source-in-tests.html#reference-syntax)
- [Where connections are opened from](https://docs.smartestqa.ai/en/data-source-in-tests.html#where-it-connects)
- [Who can see an encrypted value](https://docs.smartestqa.ai/en/data-source-secrets.html#who-sees-what)
- [What a DB-bound key returns](https://docs.smartestqa.ai/en/data-source-variables.html#value-source)
- [What the counts mean](https://docs.smartestqa.ai/en/data-source-numbers.html)

## Where Data Source fits

Data Source sits beside the order of work. You fill it before or while you automate, and every later step reads from it.

1. **Discover** — Connected actions tell the AI which pages need which keys
2. **Analyze** — No direct use
3. **Automate** — Steps read keys, cells and connections ← this page
4. **Schedule** — Pipelines loop over datasets and pick the environment ← this page
5. **Report** — Encrypted values are masked in logs
6. **Maintenance** — Change a value once, every test follows

## Why use it

- **One value, many tests.** A step stores `{{ds:loginEmail}}`, not the email itself. Change the key and every test that uses it picks up the new value on its next run.
- **Secrets stay secret.** An encrypted key is stored encrypted, never shown again on any screen, and masked as `••••••` in run logs and reports. See [Secrets and credentials](https://docs.smartestqa.ai/en/data-source-secrets.html).
- **One test, several environments.** Add `apiBase_TEST` next to `apiBase` and a run on TEST uses it automatically. See [Environment-specific keys](https://docs.smartestqa.ai/en/data-source-variables.html#environments).
- **Live data instead of hard-coded data.** A key can take its value from an SQL query at run time, or from a cell of a dataset.
- **Connections defined once.** Every DB and [Kafka step](https://docs.smartestqa.ai/en/automate-steps-kafka.html) picks a connection by name. The password lives in the connection, not in the step.

## The building blocks

- **Key:** A named value, for example `loginEmail` = `qa.user@example.com`. Unique in the project, no spaces. Steps read it as `{{ds:loginEmail}}`. The **Variables** tab lists all keys.
- **Value source:** Where a key’s value comes from: [**Typed value**](https://docs.smartestqa.ai/en/data-source-variables.html#value-source), [**Dataset cell**](https://docs.smartestqa.ai/en/data-source-variables.html#bind-dataset-cell) or [**DB query**](https://docs.smartestqa.ai/en/data-source-variables.html#bind-db-query). See [Where a value comes from](https://docs.smartestqa.ai/en/data-source-variables.html#value-source).
- **Encrypted key:** A key whose value is stored encrypted. Only a test run reads it. Use it for every password, token and API key.
- **Environment-specific key:** A key whose name ends with `_DEV`, `_TEST` or `_PRP`. A run in that environment uses it instead of the key without the suffix.
- **Dataset:** A table uploaded from XLSX, XLS or CSV, or typed in. Steps read a column as `{{excel:name}}_column`; a [pipeline](https://docs.smartestqa.ai/en/schedule-settings.html#data-loop) can run once per row.
- **DB connection:** A database login (JDBC URL, driver class, user, password) that [DB steps](https://docs.smartestqa.ai/en/automate-steps-database.html) and DB-bound keys use.
- **Kafka connection:** A broker login (bootstrap servers, security protocol, SASL user and password) that [Kafka Produce](https://docs.smartestqa.ai/en/automate-steps-kafka.html#produce) and Consume steps use.
- **Connected actions:** The [Discover actions](https://docs.smartestqa.ai/en/discover-actions.html) a key belongs to, for example the email field of the login page. They tell the AI which pages need which data. Values are never sent.
- **Folder:** Groups keys, datasets or connections. Folders change nothing at run time.

## The screen

The page opens on the tab in the address (`?tab=tables` for Datasets, `?tab=connections`), otherwise on **Variables**. An open key, dataset or connection is kept in the address too, so you can share a link to it or refresh without losing it.

| Tab | What it holds | Go there when |
| --- | --- | --- |
| **Variables** | Every key, grouped by folder, with its kind, default value, environment and connected actions. | You add or change test data or a secret. [Variables](https://docs.smartestqa.ai/en/data-source-variables.html) |
| [**Datasets**](https://docs.smartestqa.ai/en/data-source-datasets.html) | Excel and CSV tables with their size, columns and the keys that read them. | You want data-driven runs or a key that reads a cell. [Datasets](https://docs.smartestqa.ai/en/data-source-datasets.html) |
| **Connections** | Database and Kafka connections, with the keys that use each database. | A step must query a database or send a Kafka message. [Connections](https://docs.smartestqa.ai/en/data-source-connections.html) |

The [test mailbox](https://docs.smartestqa.ai/en/integrations-email.html) for [Mail steps](https://docs.smartestqa.ai/en/automate-steps-mail.html) is not here. It is set up under **Integrations** (Email).

## Who can do what

| Task | User | Admin |
| --- | --- | --- |
| Create and edit keys, datasets, connections and folders | Yes | Yes |
| Delete a key, or a key folder that still has content | No | Yes |
| Delete an empty folder, a dataset or a connection | Yes | Yes |
| Show an encrypted value | Only its creator | Only its creator |
| Replace an encrypted value | Yes | Yes |

Roles are explained in [Roles & permissions](https://docs.smartestqa.ai/en/company-settings-roles.html). Everything belongs to one project; there is no sharing of keys or connections between projects.

## Before you start

- **Select a project.** Without one the page is read-only.
- **Use test data.** Values and dataset rows are visible to every project member, except encrypted values.
- **For a database:** the JDBC URL, the driver class, and a test user with only the rights your tests need.
- **For Kafka:** the bootstrap servers and, for SASL, the mechanism, user and password.
- **Network:** the database or broker must accept connections from SmartestQA (for **Test Connection**) and from the machine that runs the tests: the SmartestQA server for [**Run on Server**](https://docs.smartestqa.ai/en/quick-start-connect.html#agent), or [your agent](https://docs.smartestqa.ai/en/agent-pool-agents.html). See [Where connections are opened from](https://docs.smartestqa.ai/en/data-source-in-tests.html#where-it-connects) and [Do you need an agent?](https://docs.smartestqa.ai/en/quick-start-connect.html#agent)

## Best practices

#### Do

- Encrypt every password, token and API key.
- Name keys the way testers talk: `loginEmail`, `apiBase`.
- Put environment differences in `_DEV`, `_TEST`, `_PRP` keys, not in separate tests.
- Click **Test Connection** before the first save of a connection.
- Give DB connections a read-only user unless a test must change data.
- Fill **Description** so others know what a key is for.

#### Don’t

- Type a password into a test step. Use an encrypted key.
- Store real customer data in datasets or keys.
- Point a DB connection at production with a user that can write.
- Delete a key before you have checked which tests use it.
- Use one personal mailbox or login for automated tests.

## In this section

- [Variables (keys)](https://docs.smartestqa.ai/en/data-source-variables.html) — Create keys, choose where their value comes from, add environment variants, connect actions, and copy, move or delete safely.
- [Datasets (Excel / CSV)](https://docs.smartestqa.ai/en/data-source-datasets.html) — Upload or type a dataset, edit its rows, read its cells in steps, and let a pipeline run once per row.
- [Connections (DB and Kafka)](https://docs.smartestqa.ai/en/data-source-connections.html) — Create, test, edit and delete database (JDBC) and Kafka connections, and see which keys and tests use them.
- [Use it in tests](https://docs.smartestqa.ai/en/data-source-in-tests.html) — How steps reference keys and datasets, how DB and Kafka steps use connections, how a run resolves values, and where connections are opened from.
- [Secrets and credentials](https://docs.smartestqa.ai/en/data-source-secrets.html) — Where passwords and tokens belong, how to encrypt a key, who can see an encrypted value, and how runs keep secrets out of logs.
- [How the numbers work](https://docs.smartestqa.ai/en/data-source-numbers.html) — Formulas and worked examples for the tab counts, the summary cards, Kind, Used by, Size and the Database column.
- [Troubleshooting](https://docs.smartestqa.ai/en/data-source-troubleshooting.html) — Every Data Source message and symptom, with why it happens, what to check and how to fix it.
- [FAQ, MCP & limits](https://docs.smartestqa.ai/en/data-source-faq.html) — Questions and answers about Data Source, how AI assistants use it through MCP, and its limits.

## Related

- [Variables and test data in Automate](https://docs.smartestqa.ai/en/automate-test-data.html)
- [Variable syntax in steps](https://docs.smartestqa.ai/en/automate-steps-variables.html#syntax)
- [Database steps](https://docs.smartestqa.ai/en/automate-steps-database.html)
- [Run a pipeline once per dataset row](https://docs.smartestqa.ai/en/schedule-settings.html#data-loop)
- [Test mailbox (Email integration)](https://docs.smartestqa.ai/en/integrations-email.html)
- [API Requests](https://docs.smartestqa.ai/en/api-requests.html)
