Skip to content

Testing Strategy ​

Unit Testing ​

ServiceFrameworkCommandCoverage Target
Safekeys CLIGo testinggo test ./apps/cli/...80%
Control Plane DatabaseGo testing with testcontainersgo test ./apps/control-plane/internal/store/...85%
Control Plane APIGo testing + testcontainers for Postgresgo test ./apps/control-plane/...80%
Safekeys MCP Servervitestnpm test --workspace packages/mcp-server80%
Python SDKpytestpytest packages/sdk-python80%
Safekeys.ai Sitevitestnpm test --workspace apps/site70%
Sidecar / ResolverGo testinggo test ./apps/sidecar/...80%
TypeScript SDKvitestnpm test --workspace packages/sdk-typescript80%

Acceptance Testing ​

Features declare 90 acceptance test(s) across 21 feature(s).

FeatureTest Count
safekeys/audit-logging4
safekeys/control-plane-api4
safekeys/policy-engine4
safekeys/deployment-packaging7
safekeys/distribution6
safekeys/docs-hosting6
safekeys/hardware-root4
safekeys/threshold-crypto4
safekeys/integration-mcp-server3
safekeys/integration-python-sdk4
safekeys/secret-creation3
safekeys/secret-transport3
safekeys/token-revocation3
safekeys/capability-token4
safekeys/encrypted-folder3
safekeys/envelope-encryption4
safekeys/dev-key-custody4
safekeys/exec-wrapper3
safekeys/output-control9
safekeys/secret-injection3
safekeys/sidecar-resolution5

Additional Testing Policies ​

  • Security Testing: Prompt-injection and stolen-token abuse cases asserted against the sidecar.
  • Automated Testing: Per-service unit and integration tests, plus a two-agent demo test asserting neither transcript contains plaintext.
  • CI Integration: usm generate --check plus per-service lint, typecheck, and test on the affected modules.