Testing Guide #
This document summarizes the repository test and validation entrypoints.
Core Test Command #
zig build test
On Linux, the CI-equivalent entrypoint is:
sh scripts/build_linux.sh
sh scripts/test_linux_unit.sh
Ubuntu Docker Validation #
To reproduce the Linux CI toolchain locally with Docker:
sh hacks/test_ubuntu_docker.sh
This builds docker/ubuntu-ci.Dockerfile and runs
scripts/test_linux_unit.sh inside an Ubuntu container.
By default it uses the host architecture, and you can force linux/amd64 when you want
closer parity with CI.
Useful variants:
sh hacks/test_ubuntu_docker.sh --rebuild
sh hacks/test_ubuntu_docker.sh -- env SKIP_ZIG_BUILD=1 sh scripts/test_release_smoke.sh --profile linux
sh hacks/test_ubuntu_docker.sh --platform linux/arm64 -- zig build test
sh hacks/test_ubuntu_docker.sh --platform linux/amd64 -- zig build test
Local Setup #
Before most local validation flows:
brew install grpc pkgconf go
sh scripts/init.sh
Sample Guest Build #
To rebuild the workflow sample guest:
sh scripts/build_workflow_sample_wasm.sh
Workflow Scaffold Check #
Probe And Golden Checks #
- scripts/test_golden_outputs.sh
- scripts/test_config_loader_suite.sh
- scripts/test_config_loader_fixtures.sh
- scripts/test_config_loader_summary.sh
- scripts/test_workflow_probe_fixtures.sh
- scripts/test_summary_golden.sh
- scripts/test_release_package.sh
- scripts/test_release_smoke.sh
These scripts validate:
- deterministic probe JSON
- combined config-loader fixture and summary coverage
- include and
env_fileloading behavior - include and
env_filebehavior for normalized run summaries - include and
env_filebehavior forabort_on_failthreshold exits - workflow setup probe behavior
- normalized run summary JSON
- release package structure and
--versionsmoke behavior - release smoke checks used by the release workflow
test_config_loader_suite.sh also supports:
allfixturessummary
Sample Integration #
- hacks/sample_http_server.py
- hacks/simple_fixture_server.py
- hacks/workflow_fixture_server.py
- hacks/grpc_fixture_server.go
- hacks/combined_fixture_servers.sh
- scripts/test_samples.sh
- scripts/test_grpc_unary.sh
- scripts/test_grpc_workflow.sh
- scripts/test_grpc_setup_teardown.sh
- scripts/test_grpc_ramping_exporters.sh
- scripts/test_grpc_hardening.sh
test_samples.sh supports:
simpleworkflowgrpcall
Backend Matrix #
This exercises the workflow sample against:
wamrwasm3
Manual TLS Regression Check #
- scripts/test_manual_tls_keepalive.sh
- scripts/test_http2_transport.sh
- scripts/test_workflow_template_matrix.sh
Release Smoke Profiles #
test_release_smoke.sh runs a common core on every platform and then uses uname -s to trim duplicate checks. You can also override the profile explicitly with --profile darwin|linux|generic, and skip optional buckets with flags such as --skip-config-loader, --skip-manual-https, --skip-simple-sample, and --skip-workflow-sample:
Darwin: manual HTTPS regression and workflow sample integrationLinux: simple sample integration
CI #
The repository CI runs:
- unit tests
- probe golden checks
- summary golden checks
- workflow probe fixtures
- workflow backend matrix checks
- simple and workflow sample integrations
The Ubuntu Docker flow above is intended to reproduce the Linux unit-test environment locally before pushing.