docs/build/cli/test/index.md
Snider 85bbb8e828 docs: initial import of CorePHP documentation
173 markdown files covering:
- Framework architecture (lifecycle events, module system, multi-tenancy)
- Package docs (admin, api, mcp, tenant, commerce, content, developer)
- CLI reference (dev, build, go, php, deploy commands)
- Patterns (actions, repositories, seeders, services, HLCRF)
- Deployment (Docker, PHP, LinuxKit, templates)
- Publishing (Homebrew, AUR, npm, Docker, Scoop, Chocolatey)

Source: core-php/docs (core.help content)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-03 17:51:03 +00:00

1.3 KiB

core test

Run Go tests with coverage reporting.

Sets MACOSX_DEPLOYMENT_TARGET=26.0 to suppress linker warnings on macOS.

Usage

core test [flags]

Flags

Flag Description
--coverage Show detailed per-package coverage
--json Output JSON for CI/agents
--pkg Package pattern to test (default: ./...)
--race Enable race detector
--run Run only tests matching this regex
--short Skip long-running tests
--verbose Show test output as it runs

Examples

# Run all tests with coverage summary
core test

# Show test output as it runs
core test --verbose

# Detailed per-package coverage
core test --coverage

# Test specific packages
core test --pkg ./pkg/...

# Run specific test by name
core test --run TestName

# Run tests matching pattern
core test --run "Test.*Good"

# Skip long-running tests
core test --short

# Enable race detector
core test --race

# Output JSON for CI/agents
core test --json

JSON Output

With --json, outputs structured results:

{
  "passed": 14,
  "failed": 0,
  "skipped": 0,
  "coverage": 75.1,
  "exit_code": 0,
  "failed_packages": []
}

See Also