# Testing signals — rustdesk/rustdesk

> Canonical page: https://codevetter.com/unpack/rustdesk/testing-signals

# Testing signals — rustdesk/rustdesk

Scanned commit c6a358afbe37c518689a6157a8e8cdbd645dcc5d (2026-09-22). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

Rust tests are unit-style `#[cfg(test)]`/`#[test]` modules embedded across src/ and a dedicated directory for video_qos; Flutter tests use flutter_test in flutter/test. CI exercises builds heavily (flutter-build.yml matrix) and runs a small set of named cargo test filters on Linux plus one flutter test file; there is no end-to-end session/integration test harness — network paths are exercised only in production.
- Rust test framework is plain `cargo test` with tokio::test (tokio test-util in dev-dependencies) plus `hound` and `docopt` dev deps; tests live inline (mod tests) and in dedicated files like src/client/tests/, src/audio_resampler/*_tests.rs, src/server/video_qos/tests/. — [Cargo.toml#L270-273](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/Cargo.toml#L270-L273) [src/client.rs#L101-103](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/client.rs#L101-L103)
- src/server/video_qos/tests/ is the most systematic suite — separate files per concern (baseline, startup, jitter, adaptation, recovery, robustness, invariants, sim, smoke) testing the QoS bitrate controller. — [src/server/video_qos/tests/baseline.rs](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/server/video_qos/tests/baseline.rs) [src/server/video_qos/tests/recovery.rs](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/server/video_qos/tests/recovery.rs)
- Audio has dedicated test files on both sides: src/server/audio_service/audio_capture_encoder_tests.rs, audio_capture_queue_tests.rs, src/client/audio_playback_tests.rs, src/client/tests/audio_playback_recovery_tests.rs + audio_state_tests.rs, and src/audio_resampler/{tests,samplerate_tests,allocation_tests}.rs. — [src/server/audio_service/audio_capture_encoder_tests.rs](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/server/audio_service/audio_capture_encoder_tests.rs) [src/client/tests/audio_playback_recovery_tests.rs](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/client/tests/audio_playback_recovery_tests.rs) [src/audio_resampler/tests.rs](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/audio_resampler/tests.rs)
- CI runs targeted cargo tests only on the Linux build: `cargo test --locked --lib --features drm drm_capturer_tests`, `cargo test --locked --lib --features drm ipc::test`, and `cargo test --locked -p scrap --features drm hotspot_provenance_tests`/`hotspot_guess_tests`; comments note a test filter matching nothing exits 0, so names must be kept in sync. — [.github/workflows/flutter-build.yml#L2058-2087](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/.github/workflows/flutter-build.yml#L2058-L2087)
- Flutter side has 12 test files in flutter/test covering terminal model/mouse/scroll/keyboard, file_model, cm, cursor_size, quality_monitor_transport, input_modifier_utils, autocomplete_peer_merge, server_settings_dialog; CI runs just `flutter test --timeout 60s test/cursor_size_test.dart`. — [flutter/test/terminal_model_lifecycle_test.dart](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/flutter/test/terminal_model_lifecycle_test.dart) [flutter/test/file_model_test.dart](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/flutter/test/file_model_test.dart) [.github/workflows/flutter-build.yml#L877](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/.github/workflows/flutter-build.yml#L877)
- Security-adjacent logic has unit tests: login_failure_check, port_forward_mux, ipc, updater, ui_cm_interface, platform/{windows,linux,mod}, drm_capturer, rdp_input, wayland, terminal_service, portable_service, display_service all contain #[test]/#[tokio::test] markers. — [src/server/login_failure_check.rs](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/server/login_failure_check.rs) [src/updater.rs](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/updater.rs) [src/ipc.rs](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/ipc.rs)
- core_main.rs has a test module verifying is_user_main_ipc_scope_cli_command matches exactly the management commands (--password/--set-unlock-pin/--get-id/--set-id/--config/--option/--assign/--deploy) and not runtime flags like --server/--cm/--connect. — [src/core_main.rs#L916-950](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/core_main.rs#L916-L950)
- UNCOVERED: the ~8000-line src/server/connection.rs auth/login/session state machine, src/client.rs's 5800-line transport selection (punch/relay/WebRTC racing), and the Flutter<->Rust session lifecycle have no integration tests; examples/ipc.rs is a manual docopt test harness for IPC only. (inferred) — [src/server/connection.rs](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/server/connection.rs) [src/client.rs](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/client.rs) [examples/ipc.rs#L1-30](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/examples/ipc.rs#L1-L30)
- Server::new_for_test() exists to construct a Server without real services for unit tests, indicating tests are expected to fake the service registry rather than hit real capture. — [src/server.rs#L121-128](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/src/server.rs#L121-L128)
- No fuzzing, no property tests, no network-mock harness found; CI 'playground.yml' is a maintainer scratch workflow, not a test gate; docs/CONTRIBUTING.md exists but the scan shows no dedicated testing doc. (inferred) — [.github/workflows/playground.yml](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/.github/workflows/playground.yml) [docs/CONTRIBUTING.md](https://github.com/rustdesk/rustdesk/blob/c6a358afbe37c518689a6157a8e8cdbd645dcc5d/docs/CONTRIBUTING.md)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
