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

Testing

Unit Tests

cargo test --lib

Integration Tests

The example project includes test clients for all supported languages:

1. Start the Example Server

cargo run -p example --bin example

This starts:

  • HTTP server on port 5001
  • WebSocket server on port 3001
  • TCP server on port 4001
  • API docs at http://localhost:5001/doc

2. Run Test Clients

Rust (TCP transport):

cargo run -p example --bin test_client

JavaScript (Node.js — fetch + ws + nodetcp):

cd client && node test_js.mjs

TypeScript (Bun — fetch + ws + buntcp):

cd client && bun run test_ts.ts

Kotlin (Gradle — HTTP + WS + TCP):

cd client/kt-test && gradle run

Feature Combinations

Test that the framework compiles cleanly with various feature combinations:

cargo check
cargo check --features hook
cargo check --features rate-limit
cargo check --features ordinary-http
cargo check --features ordinary-ws
cargo check --features ordinary-sse
cargo check --features "ordinary-http,ordinary-ws,ordinary-sse,hook,rate-limit"
cargo check --all-features

Clippy

cargo clippy --all-features

License

MIT

Copied to clipboard!