The default test runner works fine, but it is notably slower and less featureful than nextest.
Fortunately, nextest ships with the nix-shell, so assuming you have already followed the instructions in the README.md, you should be able to run
cargo nextest runeven if you have not installed nextest on your system.
[!WARNING] nextest profiles are not the same thing as cargo profiles. If you want to select a cargo profile when running nextest, use, for example
cargo nextest run --cargo-profile=releaseThe nix-shell also ships with cargo llvm-cov for collecting code coverage information. Assuming you have followed the README.md, you should be able to run
just coverageto get code coverage information.
Code coverage reports from CI are uploaded to our codecov page.
If you wish to study coverage data locally, you can run
just coverage
cd ./target/nextest/coverage/html
python3 -m http.serverAnd then open a web-browser to http://localhost:8000 to view coverage data.
The dataplane project makes fairly extensive use of fuzz testing. We use the bolero crate for our fuzz tests.
Running the test suite via cargo test or cargo nextest run will run the fuzz tests.
- The tests (even the fuzz tests) are only run briefly.
- Coverage information and sanitizers are not enabled.
- A full fuzzing engine is not set up, so evolutionary feedback is not provided when the tests are run this way.