Workflow
End-to-end workflow for setting up SolidX for automated testing, loading data, running tests, and tearing down safely.
Mental Model
The testing workflow exists to create a trustworthy system under test, not just to execute assertions.
--setupisolates datasources.seedrestores the metadata model the platform depends on.--loadcreates users, roles, and fixture records from module metadata.test runexecutes scenarios against that prepared environment.--teardownreturns the workspace to its normal state.
This page describes the end-to-end operational workflow for running automated tests in SolidX.
The goal is to bring the application into SUT mode: a clean, isolated system under test with predictable metadata, predictable test data, and safe cleanup afterward.
Environment Safety
Always treat --setup and --teardown as a pair. Setup rewrites datasource targets for an isolated run, and teardown restores the normal local environment.
Canonical Workflow
These are the standard commands:
solidctl test data --setup
solidctl seed
solidctl test data --load
solidctl test run --module <module-name>
solidctl test data --teardownCreate isolated test datasources with solidctl test data --setup.
Seed platform metadata with solidctl seed.
Load testing roles, users, and fixtures with solidctl test data --load.
Execute testing.scenarios with solidctl test run.
Tear everything down with solidctl test data --teardown.
Step 1: Test Datasource Setup
solidctl test data --setupThis step creates isolated test databases or schemas for the datasources configured in the project.
What happens here:
- A unique run name is generated.
.envis backed up.- Datasource database names are rewritten to test-specific names.
- Fresh databases or schemas are created.
- A manifest is written so teardown can reverse the process safely.
This is what moves the project into SUT mode.
Step 2: Seed Metadata
solidctl seedThis seeds the fresh test databases with the metadata required for the platform to function.
That includes:
- Models.
- Fields.
- Views.
- Actions.
- Roles.
- Permissions.
- Users.
- Settings.
- Other platform metadata.
Why this step matters:
- Test data loading depends on model metadata being present.
- Security and identity setup depend on seeded metadata.
- Scenario execution assumes the metadata model already exists.
Step 3: Load Test Data
solidctl test data --loadThis step ingests testing identity and fixture data from module metadata.
In order, it:
- Creates test roles from
testing.rolesand binds their permissions. - Creates test users from
testing.users. - Loads fixture records from
testing.datainto the test databases.
Key characteristics:
- Data stays close to the module that owns it.
- Loading is metadata-aware and idempotent.
- Existing roles and users are not duplicated.
- Record inserts behave like upserts.
- Relations can be resolved using user-key based conventions.
Ordering Requirement
Run solidctl seed before solidctl test data --load.
Controller permissions are registered during seeding, so role binding can fail if the platform metadata is not already present in the database.
You can also limit the load to specific modules:
solidctl test data --load --modules-to-test venue,reportsStep 4: Run Test Cases
solidctl test run --module venue --api-base-url http://localhost:3000 --ui-base-url http://localhost:5173 --headless falseThis step executes testing.scenarios from the selected module metadata.
The runner:
- Filters scenarios by ids or tags if requested.
- Registers built-in and custom step handlers.
- Creates adapters.
- Runs API, UI, or mixed scenarios.
- Reports results through the configured reporter.
Useful variants:
solidctl test run --module venue --list-specs true
solidctl test run --module venue --include-tags smoke
solidctl test run --module venue --scenario-ids api-authenticate-success,api-create-statesStep 5: Teardown
solidctl test data --teardownThis reverses the SUT setup process.
It typically:
- Restores
.envfrom its backup. - Deletes test datasource backups and manifests.
- Drops the test databases or schemas that were created.
- Returns the local environment to its normal state.
This step matters because it keeps local development environments clean and prevents test databases from accumulating over time.
Why This Workflow Exists
SolidX testing is intentionally workflow-heavy because the platform is metadata-driven.
Good automated testing is not only about running assertions. It also depends on:
- Predictable metadata.
- Clean test datasources.
- Deterministic fixture loading.
- Safe cleanup.
The setup/load/run/teardown pattern ensures the system under test is isolated enough to be trustworthy.
Local Development vs CI
Local development usually emphasizes:
- Running tests against local API and UI servers.
- Inspecting UI behavior in headed browser mode.
- Iterating on a narrow set of scenarios.
CI usually emphasizes:
- Deterministic setup.
- Full teardown.
- Headless browser execution.
- Module-scoped or tag-scoped runs.
Recommended SOP
For most teams, the safest operating procedure is:
- Run
solidctl test data --setup. - Run
solidctl seed. - Run
solidctl test data --load. - Start the application servers if needed.
- Run
solidctl test run. - Finish with
solidctl test data --teardown.
Common Failure Modes
Typical problems usually come from one of these:
- Skipping
seedbefore loading test data. - Pointing
--api-base-urlor--ui-base-urlat the wrong server. - Forgetting that UI tests require a running frontend.
- Stale
.envvalues after interrupted runs. - Running scenarios that depend on data that was never loaded.
Next
Continue with Vocabulary.

