product:test
Run all feature tests for one or more products. Works in both attached and detached mode.
Usage
splent product:test [--product <name>]... [--unit] [--integration] [--functional] [-v]
Options
| Option | Description |
|---|---|
--product <name> |
Product(s) to test. Can be repeated. Defaults to the active product. |
--unit |
Run unit tests only |
--integration |
Run integration tests only |
--functional |
Run functional tests only |
-v |
Verbose output |
If no level flag is given, the default is unit + integration + functional (same as feature:test).
Description
product:test is a convenience wrapper that runs feature:test for all features declared in a product’s pyproject.toml. It sets SPLENT_APP to the target product for the test subprocess, so it works without having to select the product first.
Active product (attached mode)
When a product is selected, product:test tests it by default:
splent product:test --unit
Explicit product (any mode)
Use --product to specify the target, regardless of whether a product is selected:
splent product:test --product sample_splent_app --unit
Multiple products (batch testing)
Pass --product multiple times to test several products in a single run:
splent product:test --product app_a --product app_b --product app_c --unit
The command reports per-product results and a final summary:
🧪 product:test — 3 product(s)
▶ app_a (5 features)
...
▶ app_b (3 features)
...
▶ app_c (7 features)
...
✅ All 3 product(s) passed.
If any product fails, the command exits with a non-zero code and lists the failures:
❌ 1/3 product(s) failed: app_b
Example
$ splent product:test --product sample_splent_app --unit
🧪 product:test — 1 product(s)
▶ sample_splent_app (7 features)
🧪 Running tests for 5 feature(s) [unit]...
▶ splent_feature_auth
unit
1 passed in 0.08s
▶ splent_feature_profile
unit
4 passed in 0.16s
✅ All 1 product(s) passed.
Production safety
Like feature:test, this command checks whether a production deployment is active before running. If SPLENT_ENV=prod is detected in the product’s .env file or in the running web container, the command refuses to run and exits with a clear error message.
When to use product:test vs feature:test
| Command | Scope | Use case |
|---|---|---|
feature:test |
Single or all features of the active product | Day-to-day development |
product:test |
All features of one or more products | Batch testing, CI/CD, cross-product validation |
See also
- feature:test – test features of the active product
- product:derive – full derivation pipeline with pre-flight checks