---
title: "Validate Changes"
url: "https://docs.caracal.run/contributing/testing/"
markdown_url: "https://docs.caracal.run/markdown/contributing/testing.md"
description: "Test commands and validation strategy for Caracal contributors."
page_type: "reference"
concepts: []
requires: []
---

# Validate Changes

Canonical URL: https://docs.caracal.run/contributing/testing/
Markdown URL: https://docs.caracal.run/markdown/contributing/testing.md
Description: Test commands and validation strategy for Caracal contributors.
Page type: reference
Concepts: none
Requires: none

---

Run the smallest relevant suite first, then broaden when a change touches shared code, security boundaries, generated artifacts, or deployment behavior.

## Testing Policy

This policy is mandatory and is enforced during review:

- Major new functionality MUST add automated tests covering that functionality, in the same change that introduces it.
- Every bug fix MUST add a regression test that fails without the fix and passes with it.
- Reviewers MUST confirm the required tests exist and run in CI before approving; pull requests that omit them are not merged.

## Root Commands

| Command | Purpose |
| --- | --- |
| `pnpm run build:typescript` | Build TypeScript apps and packages. |
| `pnpm run lint` | Run package linters where present. |
| `pnpm run typecheck` | Run TypeScript type checks. |
| `pnpm run test` | Full TypeScript, Go, and Python test suite. |
| `pnpm run test:typescript` | TypeScript app/package tests. |
| `pnpm run test:go` | Go service/package and interoperability tests. |
| `pnpm run test:python` | Python package tests. |
| `pnpm run ci` | Build, lint, typecheck, and test sequence. |

## Targeted Examples

| Area | Command |
| --- | --- |
| Runtime CLI | `pnpm --dir apps/runtime test` |
| Web console | `pnpm --dir apps/web test` |
| Web backend-for-frontend | `pnpm --dir apps/auth test` |
| API | `pnpm --dir apps/api test` |
| Coordinator | `pnpm --dir apps/coordinator test` |
| STS | `go test ./services/sts/...` |
| Gateway | `go test ./services/gateway/...` |
| Audit | `go test ./services/audit/...` |
| Docs | `pnpm --dir docs build` |
| Lynx Capital | `cd examples/lynxCapital && pytest tests/` |

## CI Mirror

```bash
scripts/testCi.sh
scripts/testCi.sh --smoke
scripts/testCi.sh --go
scripts/testCi.sh --py
scripts/testCi.sh --ts
```

Use broader checks when a change affects auth, crypto, config, release, infra, shared packages, SDK contracts, or interoperability schemas.

## Next Step

After validation, review [Understand Governance](/contributing/governance/) for contribution scale, review ownership, and private security process.
