Skip to content

Tests and Quality

Leonard Ramminger edited this page Aug 22, 2026 · 1 revision

Tests & Quality

Test strategy and execution.

Structure

Folder Purpose
tests/tempify/ Unit and in-process integration
tests/correctness/e2e/ Render, validate, diff, reapply
tests/portability/cli/ Real CLI subprocesses
tests/security/e2e/ Hook sandbox, sensitive data
tests/concurrency/e2e/ Parallel CLI runs
tests/fault_tolerance/fuzz/ LibFuzzer + seeds

Shared support: tests/support/

Run

make test

Single test:

ctest --test-dir build-cmake/dev -R TempifyCliBinary_help --output-on-failure

Environment variables (set by CMake):

  • TEMPIFY_TEST_BINARY - path to built CLI
  • Isolated XDG_DATA_HOME / XDG_CONFIG_HOME per E2E test

Fuzzing

Requires Clang + libFuzzer:

make fuzz
# Short smoke run:
TEMPIFY_FUZZ_MAX_TOTAL_TIME=10 make fuzz
Target Input
fuzz_slugify slugify()
fuzz_answer_json JSON parser
fuzz_cli_parser CLI arguments
fuzz_tempify_config Config files
fuzz_generation_lock Lockfile
fuzz_answer_file Answers strict/non-strict

Seeds: tests/fault_tolerance/fuzz/seeds/<target>/

Template fixtures

Reference templates under tests/test_templates/ with tempify test - see Template Tests.

Quality goals

  • High coverage of critical paths (CLI, merge, lock, hooks)
  • E2E for user workflows
  • Security tests for hook sandbox
  • Fuzz for parsers and config

See also

Security · Development & Build

Clone this wiki locally