Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Tests

Over 100 tests run on every pull request and push to main, on Linux, Windows and macOS, in a few minutes (.github/workflows/ci.yml). Linux also runs them without the GUI and camera features, and checks formatting and lints.

WorkflowRuns forDoes
ci.ymlPull requests and pushes that change codeFormatting, lints, tests on Linux, Windows and macOS
pages.ymlEvery pull request and push to mainBuilds the website, checks every link, publishes it from main
build.ymlv* tags, manual runs, pull requests that change the packaging scripts, icons or workflowRelease builds, installers and smoke tests on Ubuntu, Windows and both Mac architectures; a tag publishes the release
cargo test --locked                      # everything fast, with the GUI and cameras
cargo test --locked --no-default-features

What is tested where

AreaTests
Wing detectorstests/tracking.rs, tests/intrusions.rs (synthetic flies with known angles), tests/moth.rs (real footage)
Geometry and marker editingtests/geometry.rs
Sources, video, fallback, subscriptionstests/sources.rs, unit tests in src/avi.rs and src/source.rs
Configs, run-only overrides, rigstests/rigs.rs, tests/instances.rs, tests/persistence.rs
ZMQ compatibilitytests/zmq.rs: a ZMTP 3 subscriber (zmq.rs), a replayed ZMTP 2.0 NetMQ handshake, a ZMTP 1.0 (libzmq 2.x) subscriber, topic filtering and stalled subscribers; unit tests in src/zmq_output.rs check the message bytes against Python’s json.dumps
MCP servertests/mcp.rs drives the real binary over stdio
Documentationtests/docs.rs: the CLI help, MCP tools and config keys documented here match the program
GUIegui event tests in src/gui.rs

Report-only tests

Ignored tests print the comparison tables and produce the figures in these docs:

cargo test --release --test intrusions -- --ignored --nocapture   # synthetic tables
cargo test --release --test moth -- --ignored --nocapture         # real-footage tables
cargo test --release --test moth throughput -- --ignored --nocapture

Detector changes must keep both tables at least as good. Put them, before and after, in the pull request.

Documentation tests

tests/docs.rs fails when the docs drift from the program:

  • book/src/reference/cli-help.txt must equal the program’s --help output;
  • docs/mcp.md must name every MCP tool, and book/src/reference/mcp-tools.md must equal the server’s tool list;
  • Configuration must name every key of the default config.

After changing the help text or a tool, regenerate the files:

REKKEFLY_BLESS=1 cargo test --test docs

The website build (scripts/build_site.py) also checks every link and image in the built site.