DataLinq.Testing.CLI
DataLinq.Testing.CLI is the canonical entry point for test infrastructure orchestration and provider-matrix test runs.
Use it when the run depends on target aliases, batched server targets, runtime state, or container lifecycle control.
For first-time machine setup, required tools, and Podman/WSL bootstrap steps, see Dev and Test Environment.
Why It Exists
This tool replaced the older PowerShell-driven workflow on purpose.
Maintaining both shell scripts and a .NET CLI for the same test infrastructure is pointless duplication. One source of truth is the only sane model here.
Command Surface
list
Lists:
- suites
- aliases
- targets
- current runtime state
dotnet run --project src/DataLinq.Testing.CLI -- list
up
Starts the selected server targets and waits for readiness.
dotnet run --project src/DataLinq.Testing.CLI -- up --alias latest
dotnet run --project src/DataLinq.Testing.CLI -- up --targets mysql-8.4,mariadb-11.8
Useful option:
--recreateRemoves existing containers before starting the selected targets.
wait
Waits for the selected targets to become ready and writes runtime state.
dotnet run --project src/DataLinq.Testing.CLI -- wait --alias latest
down
Stops or removes the selected targets.
dotnet run --project src/DataLinq.Testing.CLI -- down
dotnet run --project src/DataLinq.Testing.CLI -- down --remove
reset
Recreates the selected targets from scratch.
dotnet run --project src/DataLinq.Testing.CLI -- reset --targets mysql-8.4
run
Runs the selected suite or suites against the selected targets.
dotnet run --project src/DataLinq.Testing.CLI -- run --suite all --alias quick
dotnet run --project src/DataLinq.Testing.CLI -- run --suite all --alias latest --batch-size 4
dotnet run --project src/DataLinq.Testing.CLI -- run --suite compliance --targets mysql-8.4,mariadb-11.8
Target Selection
Target selection is controlled by either --alias or --targets.
Supported aliases:
quicksqlite-file,sqlite-memorylatestsqlite-file,sqlite-memory,mysql-8.4,mariadb-11.8allevery supported target
If you do not specify a target selection for up, wait, reset, or run, the default alias is latest.
Suites
Supported suites:
generatorsunitcompliancemysqlall
all is the default and means:
- run
generatorsonce - run
unitonce - run
complianceagainst target batches - run
mysqlagainst the selected server-backed target batches
Important run Options
--suiteDefaults toall.--projectOptional project override for a single-suite run.--configurationDefaults toDebug.--buildBuilds the test project before running it.--batch-sizeDefaults to2. Must be between1and32.--parallelRuns the selected suites in parallel instead of serially.--tear-downStops provisioned server targets after the run completes.--summary-jsonWrites a machine-readable run summary JSON file.--output quiet|summary|failures|rawControls run output shape.--profile repo|sandbox|ciControls the repo-local execution profile used when invokingdotnet.
--project cannot be combined with --suite all. That combination is nonsense, and the CLI rejects it.
Interactive Mode
If you run the CLI with no arguments, it starts the interactive workflow.
You can also request interactive prompts for a command explicitly:
dotnet run --project src/DataLinq.Testing.CLI -- wait --interactive
Runtime State and Logs
The CLI writes runtime state to:
artifacts/testdata/testinfra-state.json
Raw CLI logs are written under:
artifacts/testdata/cli-logs/
That runtime state is how the test harness discovers:
- the resolved host
- the active target ids
- published ports
- configured test credentials
If you bypass the CLI and expect the suites to “just know” the active provider matrix, you are making the repo harder than it needs to be.
Environment and Matrix Inputs
The active target matrix still lives in:
test-infra/podman/matrix.json
Important environment-variable overrides include:
DATALINQ_TEST_CONTAINER_PREFIXDATALINQ_TEST_DB_HOSTDATALINQ_TEST_DB_ADMIN_USERDATALINQ_TEST_DB_ADMIN_PASSWORDDATALINQ_TEST_DB_APP_USERDATALINQ_TEST_DB_APP_PASSWORDDATALINQ_TEST_EMPLOYEES_DBDATALINQ_TEST_DB_MAX_CONNECTIONSDATALINQ_TEST_PODMAN_PATHDATALINQ_TEST_PROVIDER_SETDATALINQ_TEST_TARGETSDATALINQ_TEST_TARGET_ALIAS
Use overrides deliberately. The defaults are there so normal local runs stay simple.