Cargo Pretty Test ✨

Testing Crates.io docs.rs

A Rust command-line tool that prettifies the ugly cargo test output into a beautiful output.

This crate can be also used as a library that fully parses the output from cargo test.

```console $ cargo pretty-test --workspace --no-fail-fast

Error details from cargo test if any ... (Omitted here)

Generated by cargo-pretty-test ├── (OK) cargoprettytest ... (4 tests in 0.16s: ✅ 4) │ ├── (OK) tests/goldenmastertest.rs ... (1 tests in 0.00s: ✅ 1) │ │ └─ ✅ goldenmastertest │ ├── (OK) tests/mockingproject.rs ... (2 tests in 0.16s: ✅ 2) │ │ ├─ ✅ snapshottestingforparsedoutput │ │ └─ ✅ snapshottestingforprettyoutput │ └── (OK) tests/parsing.rs ... (1 tests in 0.00s: ✅ 1) │ └─ ✅ parsestderrstdout ├── (FAIL) integration ... (10 tests in 0.00s: ✅ 6; ❌ 2; 🔕 2) │ ├── (FAIL) src/lib.rs ... (8 tests in 0.00s: ✅ 4; ❌ 2; 🔕 2) │ │ ├── submod │ │ │ ├─ 🔕 ignore │ │ │ ├─ 🔕 ignorewithoutreason │ │ │ ├─ ✅ normaltest │ │ │ └── panic │ │ │ ├─ ❌ panicked │ │ │ ├─ ✅ shouldpanic - should panic │ │ │ ├─ ❌ shouldpanicbutdidnt - should panic │ │ │ └─ ✅ shouldpanicwithoutreanson - should panic │ │ └─ ✅ works │ ├── (OK) src/main.rs ... (1 tests in 0.00s: ✅ 1) │ │ └─ ✅ frommainrs │ └── (OK) tests/parsing.rs ... (1 tests in 0.00s: ✅ 1) │ └─ ✅ fromintegration └── (OK) Doc Tests ... (2 tests in 0.41s: ✅ 2) ├── (OK) cargo-pretty-test ... (1 tests in 0.20s: ✅ 1) │ └─ ✅ src/doc.rs - doc (line 3) └── (OK) integration ... (1 tests in 0.21s: ✅ 1) └─ ✅ tests/integration/src/lib.rs - doc (line 41)

Status: FAIL; total 16 tests in 0.57s: 12 passed; 2 failed; 2 ignored; 0 measured; 0 filtered out ```

More screenshots.

Usage

Install:

console cargo install cargo-pretty-test

Run in your project:

console cargo pretty-test

Note: all the arguments passed to cargo pretty-test are forwarded to cargo test.

Credits

Links