mz-test

Installation
SKILL.md

Testing Materialize

Unit tests

Run unit tests with cargo test. If available, use cargo nextest instead. If these complain about METADATA_BACKEND_URL, then use bin/cargo-test instead. When using -p, our packages typically have an mz- suffix, e.g., mz-adapter. Rewrite datadriven test expectations with REWRITE=1 cargo test .... Do not manually update *.snap files. Use cargo test followed by cargo insta accept to update snapshot files.

Some tests require access to a metadata store. Set environment variables to COCKROACH_URL=postgres://root@localhost:26257 METADATA_BACKEND_URL=postgres://root@localhost:26257.

Control log output during tests with MZ_TEST_LOG_FILTER=<level>, e.g. MZ_TEST_LOG_FILTER=debug cargo test ....

The first run includes a cargo build step that can take several minutes. Use a bash timeout of at least 600000ms (10 min) for test commands.

Related skills
Installs
3
GitHub Stars
6.3K
First Seen
Apr 3, 2026