05 Testing
Edgion test system. Goal: maximize meaningful coverage without padding — write tests worth keeping (critical paths, branches, risk boundaries, with real assertions) and push coverage as high as that allows; do not add low-value tests just to hit a line-coverage number.
Split into standard tests (critical-path & risk-boundary coverage) and dedicated tests (specific-scenario validation).
File list
Part 1 — Standard tests (critical-path & risk-boundary coverage)
| File | Topic | Status |
|------|------|------|
| 00-unit-testing.md | Unit testing: migrated external-file layout, how to run, writing rules, division of labor with integration tests | In progress |
| 01-integration-testing.md | Integration testing: architecture, run flow, steps to add a test, dynamic (hot reload) test scenario framework | Refactored |
| 02-k8s-integration-testing.md | K8s integration testing: differences from local testing, modification checklist, execution phases | Complete |
| 05-snapshot-testing.md | Snapshot testing: when to use / refuse, expect-test workflow, volatile-field escape hatches | Complete |
Part 2 — Dedicated tests (specific-scenario validation)
| File | Topic | Status |
|------|------|------|
| 03-link-sys-testing.md | LinkSys integration tests: bash test flow, Admin API validation, Docker Compose | Complete |
| 04-conf-sync-leak-testing.md | Config-sync leak detection: basic loop test + advanced boundary scenarios + mTLS channel test | Complete |
| 02-cache-residue-detection.md | Cache residue detection: wipe-all + store-stats leak detection, adding a new store / ignore-path, debugging leak reports | Complete |
Quick start
Run unit tests
cargo test --all
Run integration tests
# Main runner — every suite that shares the single controller/gateway topology
# (HTTPRoute, GRPCRoute, EdgionPlugins, EdgionTls, Status, LinkSys/Status,
# LinkSys/Redis, dynamic scenarios, …)
./edgion-tests/integration/scripts/integration/run_integration.sh
# Top-level in-repo orchestrator — main runner plus standalone Etcd, Elasticsearch,
# OTLP, Kafka, ACME, CLI, and FileWatcher jobs. Sequential; unified report at the end.
./edgion-tests/integration/scripts/integration/run_all_integration.sh
Federation Center tests belong to the separate EdgionCenter repository.
Run dynamic (hot reload) tests
Dynamic scenarios run by default as the final step of the full run_integration.sh (without -r) and the -r Gateway path; narrow paths (-r EdgionPlugins -i ... etc.) skip them.
# Default run: includes dynamic scenarios
./edgion-tests/integration/scripts/integration/run_integration.sh
# List / run a single scenario
./target/debug/test_client --list-dynamic-scenarios
./target/debug/test_client -g --dynamic-scenario <id>
For the scenario framework and how to add new scenarios see the "Dynamic (hot reload) testing" section in 01-integration-testing.md.
View the test report
cat ${WORK_DIR}/report.log
Key test directories
edgion-tests/src/— test code (client/server/validator)edgion-tests/integration/conf/— test configurations (organized by resource type)edgion-tests/integration/scripts/— test scriptstmp/integration_testing/— runtime working directory (gitignored)
Read on demand
- references/wasm-instance-reuse-benchmark.md — fresh/warm lifecycle benchmark, allocation instrumentation, evidence limits and comparison gates
- references/integration-suite-map.md — suite family, conf directory, Rust suite,
--gatewaymapping - references/test-server-capabilities.md —
test_serverports, HTTP endpoints, OIDC/auth, mirror, TLS backend capabilities
Debugging and troubleshooting (moved to a separate directory)
- ../06-tracing/00-debugging.md — daily development debugging, Admin API, edgion-cli, quick lookup