RTQ

Reference

Testing Strategy

RTQ's test suite verifies every security invariant across all supported platforms. Tests are labeled, gated, and honest about what they cover.

Test Labels

unit

Isolated function tests. No I/O, no network, no filesystem.

integration

Tests that exercise multiple packages together.

platform

Tests requiring a specific OS sandbox (macOS/Linux/Windows).

security

Tests that verify security invariants (INV-01 through INV-12).

approval

Tests for ticket signing, QR flow, and mobile pairing.

e2e

End-to-end pipeline tests (register → risk → policy → approve → execute).

CI Pipeline

.github/workflows/ci.yml

jobs:
  core:
    runs-on: ubuntu-latest
    steps: [checkout, setup-node, npm ci, npm test]

  sandbox-macos:
    runs-on: macos-latest
    steps: [checkout, setup-node, npm ci, npm test -- --label platform=macos]

  sandbox-linux:
    runs-on: ubuntu-latest
    steps: [checkout, setup-node, npm ci, npm test -- --label platform=linux]

  sandbox-windows:
    runs-on: windows-latest
    steps: [checkout, setup-node, npm ci, npm test -- --label platform=windows]

Honest Status

Current CI run: 158+ passing / 40 environment-skipped / 0 failing.

  • • Platform-specific tests that cannot run on the CI host are counted as skipped, never as passing.
  • • If a test is skipped, it is documented and visible in CI output.
  • • No test is marked as passing unless it actually executed and verified the invariant.

Running Tests Locally

# Run all tests
npm test

# Run only security invariants
npm test -- --label security

# Run platform-specific tests
npm test -- --label platform=macos

# Run with verbose output
npm test -- --verbose