Testing
Comprehensive guide to SolidX testing architecture, workflow, vocabulary, and execution.
Testing
SolidX provides a metadata-driven testing system that supports:
- automated API testing,
- automated frontend end-to-end testing using Playwright,
- shared assertions and utility steps,
- managed test data setup and teardown,
- and CLI-driven workflows for bringing the application into system under test (SUT) mode.
The important idea is that API and UI tests are not treated as two unrelated systems. They run through a shared testing engine and a shared scenario model, while using different adapters underneath.
Mental Model
SolidX testing is best understood as a single metadata-driven test system with multiple execution modes.
- Metadata defines fixtures, scenarios, and custom specs.
- The workflow prepares the system under test through setup, seed, load, run, and teardown.
- The engine executes API, UI, or mixed scenarios through shared primitives. So the intuition is: API testing, UI testing, and test data management are all parts of the same testing architecture, not separate disconnected tools.
What This Section Covers
This Testing section is split into a few focused pages:
- Architecture: how the testing engine, adapters, steps, registries, and reporters fit together
- Workflow: the end-to-end SOP for setup, seed, load, run, and teardown
- Vocabulary: the key terms used in SolidX testing
- Authoring Scenarios: how to write
testingmetadata - API Testing: API automation patterns and supported primitives
- UI Testing: Playwright-based E2E testing patterns and supported primitives
Read This In Order
If you are new to SolidX testing, the best reading order is:
What SolidX Testing Looks Like In Practice
A typical test run looks like this:
- Create isolated test datasources with
test data --setup - Seed metadata into the fresh databases
- Load test fixtures from module metadata
- Run API and/or UI scenarios
- Tear everything down and restore the original environment
At runtime, the testing engine:
- loads
testing.scenariosfrom module metadata, - filters scenarios by id or tag,
- registers built-in API, UI, assert, util, and custom spec steps,
- interpolates environment variables, params, test data, and saved resources,
- and executes each scenario through the shared engine.
Where Testing Configuration Lives
Testing support is declared in module metadata under the testing key. That metadata can contain:
specsfor custom test spec registration,rolesandusersfor testing-oriented identity setup,datafor test fixtures,scenariosfor executable test flows.
Operational Entry Point
The operational entry point for testing is solidctl.
The main commands you will use are:
npx @solidxai/solidctl@latest test data --setup
npx @solidxai/solidctl@latest seed
npx @solidxai/solidctl@latest test data --load
npx @solidxai/solidctl@latest test run --module <module-name>
npx @solidxai/solidctl@latest test data --teardownFor the command reference itself, see solidctl Reference.