8 releases (breaking)

Uses new Rust 2024

0.21.0 Nov 13, 2025
0.20.0 Aug 25, 2025
0.19.0 Jun 27, 2025
0.18.0 Apr 14, 2025
0.14.0 Aug 3, 2022

#998 in Encoding

Download history 339/week @ 2025-12-11 127/week @ 2025-12-18 27/week @ 2025-12-25 5/week @ 2026-01-01 99/week @ 2026-01-08 82/week @ 2026-01-15 55/week @ 2026-01-22 89/week @ 2026-01-29 197/week @ 2026-02-05 240/week @ 2026-02-12 207/week @ 2026-02-19 139/week @ 2026-02-26 243/week @ 2026-03-05 311/week @ 2026-03-12 167/week @ 2026-03-19 178/week @ 2026-03-26

926 downloads per month
Used in apache-avro

Apache-2.0

29KB
672 lines

Avro Test Helper

A module that provides several test related goodies to the other Avro crates:

Custom Logger

The logger:

  • collects the logged messages, so that a test could assert what has been logged
  • delegates to env_logger so that they printed on the stderr

Colorized Backtraces

Uses color-backtrace to make the backtraces easier to read.

Setup

Unit tests

The module is automatically setup for all unit tests when this crate is listed as a [dev-dependency] in Cargo.toml.

Integration tests

Since integration tests are actually crates without Cargo.toml, the test author needs to call test_logger::init() in the beginning of a test.

Usage

To assert that a given message was logged, use the assert_logged function.

apache_avro_test_helper::logger::assert_logged("An expected message");

Dependencies

~3–13MB
~127K SLoC