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.
Executing test suites
Section titled “Executing test suites”Running make test executes all primary testing suites across the monorepo. Subsystem test targets enable rapid local test-driven development:
| Make target | Test execution scope |
|---|---|
make test-rust | Rust unit and integration suites (speedwave-runtime, speedwave-cli). |
make test-cli | CLI parsing, argument handling, and subcommands. |
make test-mcp | All MCP server packages (shared, hub, Slack, GitHub, etc.). |
make test-angular | Angular desktop frontend unit and component tests. |
make test-e2e | CLI Bats integration test suites. |
make test-entrypoint | Container bootstrap script Bats tests. |
make test-desktop | Desktop integration test suites. |
Code coverage thresholds
Section titled “Code coverage thresholds”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-pyexecutes 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):
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.tsis explicitly queued as the final test execution step. - Selector stability: All interactive UI controls provide explicit
data-testidattributes.
Architecture and mocking patterns
Section titled “Architecture and mocking patterns”- Rust test suites: Unit tests reside in
#[cfg(test)] mod testsmodules within source files; multi-crate integration tests reside undertests/. - 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.