Testing
Commands for running tests, measuring coverage, and load testing in the SPLENT workspace.
Test levels
Features follow a layered test structure. Each level tests at a different scope:
| Level | Directory | Dependencies | Run with |
|---|---|---|---|
| Unit | tests/unit/ |
Mocks only — no DB, no HTTP | splent feature:test --unit |
| Integration | tests/integration/ |
Real test database | splent feature:test --integration |
| Functional | tests/functional/ |
Flask test client + DB | splent feature:test --functional |
| E2E | tests/e2e/ |
Selenium + running server | splent feature:test --e2e |
| Load | tests/load/ |
Locust + running server | splent feature:test --load |
By default (no flags), feature:test runs unit + integration + functional. E2E and load tests require explicit flags since they need external services.
Quick reference
splent feature:test # All features, default levels
splent feature:test auth --unit # Unit tests for auth only
splent feature:test --integration -v # Integration tests, verbose
splent feature:test -k test_login # Keyword filter
See feature:test for full documentation.