Skip to main content

Testing

cargo xtask test # what changed since the last green run
cargo xtask test --all
cargo test --release -p taunus-accounts google:: # one crate, one filter
cargo test --release -p taunus-settings --features shot uitest # headless UI tests
  • Unit tests live next to the code. Logic that matters (state machines, parsers, geometry) is kept in pure functions so it can be tested without a device.
  • Headless UI tests render windows with Slint's software renderer, drive them with keys and taps and check what is focused or shown. TAUNUS_UITEST_SHOTS=DIR writes a PNG per step.
  • The gallery (cargo run --release -p taunus-gallery) shows every widget; -- --shot DIR writes them as PNGs, --form-factor tv in the TV look.
  • Translations: cargo test --release -p taunus-i18n checks every @tr, t! and tn! against the language files.
  • A test that reads files outside its crate needs an entry in EXTRA (tools/xtask/src/tests_run.rs), so xtask test knows when to run it.

GitHub builds every push in Alpine on arm64 (both build types, all tests); a warning fails the build.