cargo checkto analyze the current package and report errors.cargo buildto compile the current package.cargo clippyto catch common mistakes and improve code.cargo test --features teststo run unit tests.cargo testto run unit tests include doc tests.cargo benchto run benchmark tests.
Useful tips:
- Check/Build/Test/Clippy all code:
cargo <cmd> --tests --benches --examples - Test specific function:
cargo test tests::it::services::fs
We have unit tests and behavior tests.
Unit tests are placed under src/tests, organized by mod.
To run unit tests:
cargo test --features testsTo run unit tests include doc tests:
cargo testBehavior Tests are used to make sure every service works correctly.
# Setup env
cp .env.example .env
# Run tests
cargo testPlease visit Behavior Test README for more details.
We use Ops Benchmark Tests to measure every operation's performance on the target platform.
# Setup env
cp .env.example .env
# Run benches
cargo benchPlease visit Ops Benchmark README for more details.