Skip to content

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

FieldDescription
KeyEnvironment variable name, e.g. BASE_URL
ValueThe value for this run, e.g. https://staging.acme.com
SensitiveToggle to mask the value in logs and UI
text
BASE_URL        = https://staging.acme.com
TEST_USER       = qa-bot@acme.com
TEST_PASSWORD   = ******** (sensitive)
FEATURE_CART_V2 = true

Sensitive 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

FormatImportExport
CSVComma or semicolon delimited, auto-detectedStandard comma-delimited UTF-8
JSONArray of objects with consistent keysPretty-printed array of objects
json
[
  { "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:

text
+-----------------------+----------+----------+----------+
| 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 executions

Click 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.

Local-first QA orchestration.