Variables & Datasets
This page covers the editors for managing test data inside the Test Hub.
Variables Editor
Variables are key-value pairs injected into process.env before each test run. Open the Variables panel from Test Hub > Data > Variables.
Creating Variables
| Field | Description |
|---|---|
| Key | Environment variable name, e.g. BASE_URL |
| Value | The value for this run, e.g. https://staging.acme.com |
| Sensitive | Toggle to mask the value in logs and UI |
BASE_URL = https://staging.acme.com
TEST_USER = qa-bot@acme.com
TEST_PASSWORD = ******** (sensitive)
FEATURE_CART_V2 = trueSensitive Values
Variables marked as Sensitive are stored encrypted in .xyva/test-data/variables.enc.json. They appear masked in the console output and are never written to run logs.
Variable Groups
Organize variables into named groups — for example, staging, production, feature-branch. Switch the active group before launching a run to target different environments without editing individual values.
Dataset Editor
Datasets provide tabular data for parameterized testing. Open the editor from Test Hub > Data > Datasets.
Tabular Editor
The built-in spreadsheet-style editor supports:
- Add/remove columns — define the schema for your data
- Add/remove rows — each row becomes one test iteration
- Inline editing — click any cell to modify
- Drag to reorder — rearrange rows by priority
Import & Export
| Format | Import | Export |
|---|---|---|
| CSV | Comma or semicolon delimited, auto-detected | Standard comma-delimited UTF-8 |
| JSON | Array of objects with consistent keys | Pretty-printed array of objects |
[
{ "username": "admin", "role": "super", "expected": "dashboard" },
{ "username": "viewer", "role": "readonly", "expected": "reports" },
{ "username": "blocked", "role": "none", "expected": "403-page" }
]CSV with Headers
The first row of a CSV import is always treated as column headers. Ensure your CSV has a header row before importing.
Run Matrix
After selecting tests in the Catalog and binding a Dataset, the Run Matrix preview shows every combination:
+-----------------------+----------+----------+----------+
| Test | username | role | expected |
+-----------------------+----------+----------+----------+
| login.spec.ts | admin | super | dashboard|
| login.spec.ts | viewer | readonly | reports |
| login.spec.ts | blocked | none | 403-page |
| navigation.spec.ts | admin | super | dashboard|
| navigation.spec.ts | viewer | readonly | reports |
| navigation.spec.ts | blocked | none | 403-page |
+-----------------------+----------+----------+----------+
Total: 6 executionsClick Launch Matrix to send this execution plan to the Runner.
Accessing Data in Tests
Dataset values are available via process.env.DATASET_<COLUMN> — for example, process.env.DATASET_username. Column names are upper-cased and prefixed automatically.
