Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dbrgn/tracing-test
Access and evaluate tracing logs in async and sync tests.
https://github.com/dbrgn/tracing-test
async rust testing-tools tracing
Last synced: about 2 months ago
JSON representation
Access and evaluate tracing logs in async and sync tests.
- Host: GitHub
- URL: https://github.com/dbrgn/tracing-test
- Owner: dbrgn
- License: apache-2.0
- Created: 2020-10-27T09:30:41.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-06-02T16:29:00.000Z (4 months ago)
- Last Synced: 2024-07-28T18:35:38.624Z (about 2 months ago)
- Topics: async, rust, testing-tools, tracing
- Language: Rust
- Homepage:
- Size: 49.8 KB
- Stars: 58
- Watchers: 4
- Forks: 26
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# tracing-test
[![Build status][workflow-badge]][workflow]
[![Crates.io Version][crates-io-badge]][crates-io]
[![Crates.io Downloads][crates-io-download-badge]][crates-io-download]This crate provides an easy way to enable logging in tests that use
[tracing](https://tracing.rs/), even if they're async. Additionally, it adds a
way to assert that certain things were logged.The focus is on testing the logging, not on debugging the tests. That's why the
library ensures that the logs do not depend on external state. For example, the
`RUST_LOG` env variable is not used for log filtering.Similar crates:
- [test-log](https://crates.io/crates/test-log): Initialize loggers before
running tests
- [tracing-fluent-assertions](https://crates.io/crates/tracing-fluent-assertions):
More powerful assertions that also allow analyzing spans## Docs / Usage / Example
See .
## License
Copyright © 2020-2023 Threema GmbH, Danilo Bargen and Contributors.
Licensed under either of
* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or
http://opensource.org/licenses/MIT) at your option.### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall
be dual licensed as above, without any additional terms or conditions.[workflow]: https://github.com/dbrgn/tracing-test/actions?query=workflow%3ACI
[workflow-badge]: https://img.shields.io/github/actions/workflow/status/dbrgn/tracing-test/ci.yml?branch=main
[crates-io]: https://crates.io/crates/tracing-test
[crates-io-badge]: https://img.shields.io/crates/v/tracing-test.svg?maxAge=3600
[crates-io-download]: https://crates.io/crates/tracing-test
[crates-io-download-badge]: https://img.shields.io/crates/d/tracing-test.svg?maxAge=3600