xburner is an experimental HTTP and gRPC load generator written in Zig.
xburner docs testing.md
4.6 kB · 144 lines
Markdown
at main

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 #

These scripts validate:

  • deterministic probe JSON
  • combined config-loader fixture and summary coverage
  • include and env_file loading behavior
  • include and env_file behavior for normalized run summaries
  • include and env_file behavior for abort_on_fail threshold exits
  • workflow setup probe behavior
  • normalized run summary JSON
  • release package structure and --version smoke behavior
  • release smoke checks used by the release workflow

test_config_loader_suite.sh also supports:

  • all
  • fixtures
  • summary

Sample Integration #

test_samples.sh supports:

  • simple
  • workflow
  • grpc
  • all

Backend Matrix #

This exercises the workflow sample against:

  • wamr
  • wasm3

Manual TLS Regression Check #

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 integration
  • Linux: 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.