Skip to content

Testing and validation

Speedwave enforces a multi-tier testing pyramid: Rust unit and integration tests, MCP TypeScript suites, Angular component tests, and full WebdriverIO end-to-end automation. Before submitting pull requests, ensure your modifications clear corresponding test suites. For environment setup, refer to Development environment setup.

Running make test executes all primary testing suites across the monorepo. Subsystem test targets enable rapid local test-driven development:

Make targetTest execution scope
make test-rustRust unit and integration suites (speedwave-runtime, speedwave-cli).
make test-cliCLI parsing, argument handling, and subcommands.
make test-mcpAll MCP server packages (shared, hub, Slack, GitHub, etc.).
make test-angularAngular desktop frontend unit and component tests.
make test-e2eCLI Bats integration test suites.
make test-entrypointContainer bootstrap script Bats tests.
make test-desktopDesktop integration test suites.

Execute make coverage to generate consolidated coverage reports. Quality gates enforce minimum thresholds:

  • Rust crates: Minimum 70% line coverage required in CI.
  • MCP packages: Target 100% line and function coverage defined in vitest.config.ts.
  • Office parsing validation: make test-mcp-office-py executes real Python document parsing against sample Office files in an isolated virtual environment.

Desktop end-to-end automation (WebdriverIO)

Section titled “Desktop end-to-end automation (WebdriverIO)”

Desktop end-to-end testing exercises packaged Tauri application binaries using WebdriverIO over the embedded tauri-plugin-webdriver interface (listening on port 4445):

Terminal window
make test-e2e-desktop
  • Execution order: 18 spec suites (desktop/e2e/specs/) validate the onboarding wizard, container health probes, project configuration, LLM token streaming, and OAuth login flows.
  • Factory reset isolation: The destructive suite 07-factory-reset.spec.ts is explicitly queued as the final test execution step.
  • Selector stability: All interactive UI controls provide explicit data-testid attributes.
  • Rust test suites: Unit tests reside in #[cfg(test)] mod tests modules within source files; multi-crate integration tests reside under tests/.
  • MCP server suites: Tools are tested via factory definitions (createXTools()) using mocked service adapters to validate argument schemas, business logic, and error handling.
  • Angular frontend suites: Tests mock Tauri IPC commands via MockTauriService.