SolidX
ReferenceTesting

Vocabulary

Key terms and concepts used in SolidX testing.

Mental Model

The testing vocabulary is easier to learn as a hierarchy than as a flat glossary.

  • A project is brought into SUT mode.
  • A module contributes testing metadata.
  • That metadata defines data, specs, and scenarios.
  • Scenarios are made of steps.
  • Steps execute ops through adapters and the runtime context.
  • Ops run through adapters, the runtime context, and the resource store

This page defines the core terms used throughout SolidX testing documentation.

Start Here

At a high level, the structure looks like this:

SUT
└── Module under test
    └── testing metadata
        ├── data
        ├── specs
        └── scenarios
            └── steps
                └── ops
                    ├── api
                    ├── ui
                    ├── assert
                    ├── util
                    └── test

The most useful reading order is usually:

  • Environment and execution terms.
  • Metadata structure terms.
  • Scenario and step terms.
  • Runtime and execution terms.

How To Read This Page

Use this page as a glossary while reading the workflow and authoring guides. The terms are grouped from outer setup concepts down to runtime execution details.

Level 1: Environment And Execution Scope

System Under Test (SUT)

The specific SolidX application environment being prepared and exercised by the test workflow.

In practice, SUT mode usually means:

  • Isolated test datasources are active.
  • Metadata has been seeded.
  • Test fixtures have been loaded.
  • The app is ready for scenario execution.

Module Under Test

The module whose testing metadata is being loaded and executed, typically passed through:

solidctl test run --module venue

Datasource

A configured database connection used by the application.

The test workflow creates isolated test databases or schemas per datasource.

Run Name

A generated identifier used during test data --setup to distinguish one isolated testing run from another.

It helps name backups, manifests, and test datasources safely.

Manifest

The file written during test setup that records what was created so teardown can reverse it safely and deterministically.

Headless

A browser execution mode where UI tests run without showing a visible browser window.

This is common in CI runs.

Level 2: Metadata Structure

Testing Metadata

The testing section inside module metadata JSON files.

This metadata can define:

  • specs
  • roles
  • users
  • data
  • scenarios

Read this as:

  • testing: The root testing block for a module.
  • testing.roles: Test role definitions with permissions.
  • testing.users: Test user definitions with credentials and role assignments.
  • testing.data: Reusable fixtures loaded before execution.
  • testing.specs: Custom spec registration entry points.
  • testing.scenarios: Executable scenario definitions.

Scenario

An executable testing flow defined in metadata.

A scenario has:

  • An id.
  • An optional name.
  • A type.
  • Optional params.
  • Optional tags.
  • Optional timeout and retry settings.
  • A list of steps.

Scenario Type

The execution mode of a scenario.

Supported values are:

  • api
  • ui
  • mixed

Test Data

Fixture records defined in testing.data.

These are loaded into the test database before scenario execution and can also be referenced inside scenarios through interpolation.

In practice, test data often acts as a reusable fixture library for:

  • Master data such as states, cities, regions, or products.
  • Relation-driven records expressed through ...UserKey fields.
  • Upload fixtures where a field value points to file:/absolute/path.

Test Data Index

The in-memory indexed representation of testing.data built by the runner.

This powers ${data:...} lookups during scenario execution.

Spec

In the SolidX testing context, a spec usually means a custom executable testing unit registered for use through test.spec.

This differs from a scenario:

  • A scenario is metadata-defined orchestration.
  • A spec is custom code invoked from a scenario.

Testing Roles

Role definitions declared in testing.roles.

Each entry names a role and lists the permissions to bind to it. Permissions can be exact (ControllerName.methodName) or wildcard (ControllerName.*).

Testing Users

User definitions declared in testing.users.

Each entry provides credentials and an optional list of role names to assign.

Tag

A label attached to a scenario for filtering and grouping.

Tags make it easy to run only subsets such as:

  • smoke
  • regression
  • auth

Level 3: Scenario Composition

Step

A single executable unit inside a scenario.

Steps can be written in:

  • Phase style using given, when, then, and.
  • Flat op style.

Each step ultimately resolves to an operation handler.

Op

Short for operation.

This is the executable name of a step, for example:

  • api.request
  • ui.goto
  • assert.equals
  • util.sleep
  • test.spec

Read the hierarchy like this:

  • A scenario contains steps.
  • A step names an op.
  • An op belongs to a family such as api, ui, assert, util, or test.

Given / When / Then / And

BDD-style step phases used for readability.

These phases are normalized before execution. The engine treats all four identically.

Use given for preconditions, when for the action under test, then for assertions, and and to continue the previous phase without repeating it.

saveAs

A step field that stores the result of the step into the resource store.

{
  "when": {
    "op": "api.auth.bearerFromLogin",
    "with": { "url": "...", "username": "alice", "password": "secret" },
    "saveAs": "auth.token"
  }
}

In real projects, this is often used to save the full authentication response, such as loginSuccess, and later read the token from ${res:loginSuccess.bodyJson.data.accessToken}.

test.spec

A built-in step operation that executes a registered custom spec.

Use it when built-in operations are not expressive enough.

util.require

A built-in utility step used to fail fast when a required resource is missing from the resource store.

This is commonly used to make scenario prerequisites explicit, such as requiring loginSuccess before attempting authenticated API calls.

util.random

A built-in utility step that returns one random value, so saveAs can keep it.

{ "given": { "op": "util.random", "with": { "generator": "emailAddress", "args": { "domain": "acme.test" } }, "saveAs": "newEmail" } },
{ "when": { "op": "ui.fill", "with": { "selector": "#email", "value": "${res:newEmail}" } } },
{ "then": { "op": "ui.expectText", "with": { "selector": ".profile-email", "equals": "${res:newEmail}" } } }

util.script

A built-in utility step that runs a short TypeScript function and returns its result, so saveAs can keep it.

Use it for what a token cannot do: find an item by a condition, combine two responses, or reshape a value for the next request. A fixed path such as ${res:books.bodyJson.records.0.id} or a regex (| match:) needs no script; see Reading Saved Results.

Tokens go in input, code goes in script. The script sees only input, so everything it needs from the run (saved results, params, test data, secrets, random or current values) is listed there as a token:

{ "when": { "op": "api.request", "with": { "method": "GET", "url": "${env:API_BASE_URL}/api/book" }, "saveAs": "books" } },
{ "and": {
    "op": "util.script",
    "with": {
      "input": { "records": "${res:books.bodyJson.records}", "title": "${params.title}" },
      "script": [
        "const book = input.records.find((b: any) => b.title === input.title);",
        "if (!book) throw new Error(`No book titled ${input.title}`);",
        "return book.id;"
      ]
    },
    "saveAs": "bookId"
} },
{ "then": { "op": "api.request", "with": { "method": "DELETE", "url": "${env:API_BASE_URL}/api/book/${res:bookId}" } } }
  • A value in input that is exactly one token keeps its type: "${res:books.bodyJson.records}" arrives as a list, and "${res:r.status}" as a number. A token inside text ("id-${res:r.status}") is text.
  • Don't write tokens inside script; the step refuses them. Inside code, ${...} belongs to JavaScript: in a template literal such as `Book ${input.id}` it inserts a variable's value. So the runner leaves the script exactly as written, and values reach it only through input.
  • The script runs synchronously: no await, require, timers or network. It gets a copy of input, so it cannot change a saved result, and it stops after the step's timeoutMs (5000 by default, 30000 at most). Nothing else in the runner runs meanwhile, so keep scripts small.
  • It must return data when the step has saveAs. The result is saved as JSON, so a date comes back as ISO text. A throw fails the step, so a script without saveAs can act as a custom check.
  • console.log and its siblings are collected and attached to the step's report, also when the script fails.
  • TypeScript is compiled with the project's typescript package; where that is not installed, write plain JavaScript.
  • The script is given only text, which keeps the runner's process out of its reach, but Node's vm is not a guaranteed security boundary. Treat a script as code run by whoever can change the scenario file.
  • For I/O, async work or logic shared between scenarios, write a test.spec instead.

Level 4: Runtime And Execution

Adapter

A runtime integration layer that connects generic test steps to concrete tooling.

Examples:

  • The API adapter executes HTTP requests.
  • The UI adapter uses Playwright for browser automation.

Playwright Adapter

The UI testing adapter used by SolidX for browser-based E2E testing.

It powers navigation, actions, and assertions against the frontend.

Resource Store

A shared runtime store used to persist values across steps and scenarios.

Values are written using saveAs and later read using ${res:...} interpolation.

Typical stored values include:

  • Auth tokens.
  • Ids.
  • Response objects.
  • Custom spec results.

To derive a new value from saved results, such as one id picked out of a response list, use util.script.

Interpolation

The process of resolving dynamic placeholders inside testing metadata before a step executes.

Common token families are:

  • ${env:NAME} reads a value from the test process environment.
  • ${secret:key} reads a credential from the secret store.
  • ${params.foo} reads a value from the current scenario params.
  • ${res:path.to.value} reads a value saved into the runtime resource store.
  • ${data:model["recordKey"].field} reads a value from indexed testing.data.
  • ${random:generator} generates a realistic value that is not repeated within the run. See Random Test Data.
  • ${now:date} reads the current date or time, optionally shifted: ${now:date(offset=+7d)}. See Random Test Data.

Reading Saved Results

${res:<name>.<path>} reads what an earlier step saved with saveAs. An api.request result has status, headers, bodyText and bodyJson. The examples read a books result whose body is:

{ "records": [ { "id": 7, "title": "Dune" }, { "id": 8, "title": "Emma", "note": "" } ] }

Paths:

  • ${res:books.status} gives 200.
  • ${res:books.bodyJson.records.0.id} gives 7. A number in the path is a position in a list, counted from 0.
  • ${res:books.bodyJson.records[1].title} gives Emma. Brackets and dots mean the same.
  • ${res:books.bodyJson.records.length} gives 2, the number of records.
  • ${res:books.bodyJson.records.0} gives the whole first record, as JSON text.
  • ${res:created.headers.location} reads a response header. Header names are lower case.

A token becomes text, even when it is the whole value (except a ._rec record, a secret that is not text, and the input of util.script). So in assert.equals write the expected value as text: "expected": "7", not 7.

Transforms go after the path, each after a |:

  • | match:PATTERN runs a regular expression over the value and gives the part in brackets, or the whole match when the pattern has no brackets.
  • | default:VALUE replaces a value that is null or empty.
{ "then": { "op": "assert.equals", "with": { "actual": "${res:created.headers.location | match:/api/book/(\\d+)}", "expected": "42" } } },
{ "and":  { "op": "api.request", "with": { "method": "GET", "url": "${env:API_BASE_URL}/api/order/${res:receipt.bodyText | match:ref=([A-Z0-9-]+)}" } } },
{ "and":  { "op": "ui.fill", "with": { "selector": "#note", "value": "${res:books.bodyJson.records.1.note | default:none}" } } }

The first gives 42 from a Location: /api/book/42 header. The second takes BK-2026-0042 from a plain-text body such as Created book id=42 ref=BK-2026-0042. The third types none, because that record's note is empty.

Each of these fails the step:

  • A path that does not exist (Missing resource for token). default: does not help here: it replaces only a null or empty value.
  • A pattern that matches nothing.
  • A pattern that contains } or |: the } ends the token, and | starts another transform. Write \d\d rather than \d{2}. For alternatives such as (id|ref), use util.script.

In a JSON file, double every backslash: \\d in the file reaches the pattern as \d. On a list or object, match: runs over its JSON text. For the last item of a list, an item found by a field value, or anything computed, use util.script.

Random Test Data

Values generated during a run, for fields the application under test keeps unique: an email address, a phone number, a PAN, an invoice number. A literal value works once and then fails on the next run with "already exists". Generated values look like real input, and none is repeated within one run.

There are seven generators: firstName, lastName, emailAddress, mobileNo, panNo, date and invoiceId. A ${random:...} token gives a new value each time it is resolved: ${random:mobileNo(country=gb, format=e164)}. To use one value in several steps, generate it with util.random and read it back with ${res:...}.

Every generator, argument and allowed value is on the Random Test Data page.

Secret

A credential held in the SolidX secret store and referenced from a scenario as ${secret:key}.

Unlike ${env:...} values, secrets are never supplied by the caller of a test run. They are resolved on the server from the store, decrypted only for the duration of the run, and returned with the type declared on the secret — a json secret resolves to an object, a number to a number.

Only the secrets a scenario actually references are resolved, and a scenario never receives secrets referenced by other scenarios in the same run.

Reporter

A component that receives lifecycle events from scenario execution and turns them into visible output.

The default reporter is a console reporter.

Runtime Context

The object shared across step execution.

It includes:

  • Scenario metadata.
  • Params.
  • Adapters.
  • Reporter.
  • Resource store.
  • Last API response.
  • Spec registry.
  • Indexed test data.

Last API Response

The most recent API response stored in the runtime context.

This is especially useful for assertions like assert.httpStatus.

Next

Continue with Authoring Scenarios.