Ktesio

Testing

The test suite covers unit behavior, CLI workflows, and local git fixtures.

Required Checks

Run these before opening a pull request:

cargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo test --all-targets
python3 scripts/check_docs.py
python3 scripts/speckit_sync_issues.py --feature-dir tests/fixtures/speckit-sync-feature --dry-run
python3 scripts/generate_release_docs.py v0.0.0 --output-dir target/release-docs-test
PYTHONDONTWRITEBYTECODE=1 python3 scripts/test_automation.py

Unit and Integration Tests

cargo test --all-targets

Integration tests create local temporary git repositories. They do not require network access.

Coverage

CI runs cargo tarpaulin --fail-under 95 as the coverage gate. To run it locally:

cargo install cargo-tarpaulin
cargo tarpaulin --fail-under 95

Generate an HTML report:

cargo tarpaulin --out Html

Documentation Checks

python3 scripts/check_docs.py

The docs check validates:

  • Root and docs/ Markdown links.
  • JSON fenced code blocks.
  • Documented kt command examples.
  • Stale links to old repository names or generated spec quickstarts.

Release Script Checks

python3 scripts/generate_release_docs.py v0.0.0 --output-dir target/release-docs-test

This verifies the release-note generator can handle a first-release style tag when no previous tag exists.

Automation Helper Tests

PYTHONDONTWRITEBYTECODE=1 python3 scripts/test_automation.py

These tests cover Speckit task parsing, safe checkbox pull behavior, GitHub Project ambiguity handling, release asset tables, installer dry-run decisions, and workflow expectations.

On this page