The tests for all languages may be run from the command line:
Windows Note: On Windows,
makeis not available by default. While not required, installing
makewill allow you to use the convenience features in the
The Rust tests may be run with the following command:
cargo test --all
Log output can be controlled via the environment variable
RUST_LOG for the
When running tests with logging you need to tell
cargo to not suppress output:
cargo test -- --nocapture
Tests run in parallel by default, leading to interleaving log lines. This makes it harder to understand what's going on. For debugging you can force single-threaded tests:
cargo test -- --nocapture --test-threads=1
The full Android test suite may be run from the command line with:
To run the full Android test suite, in the "Gradle" pane, navigate to
verification and double-click either
testReleaseUnitTest (depending on whether you want to run in Debug or Release mode).
You can save this task permanently by opening the task dropdown in the toolbar and selecting
"Save glean.rs:glean:android [testDebugUnitTest] Configuration".
To run a single Android test, navigate to the file containing the test, and right click on the green arrow in the left margin next to the test. There you have a choice of running or debugging the test.
The full iOS test suite may be run from the command line with:
To run the full iOS test suite, run tests in Xcode (
Product -> Test).
To run a single Swift test, navigate to the file containing the test,
and click on the arrow in the left margin next to the test.
See Continuous Integration for details.