cargo-ptest

Crates.iocargo-ptest
lib.rscargo-ptest
version1.3.3
created_at2025-10-12 14:32:08.599693+00
updated_at2025-11-18 09:51:29.138926+00
descriptionIf installed using cargo install it acts as a command line tool, if used as a package provides methods for running and parsing the output of cargo test.
homepage
repositoryhttps://github.com/Ogwen123/cargo-ptest
max_upload_size
id1879355
size49,958
Owen Jones (Ogwen123)

documentation

README

ptest

Prettify the output of cargo test

If installed using cargo install it acts as a command line tool, if used as a package provides methods for running and parsing the output of cargo test.

Example

Example Linear Output

Generated by ptest
├ Ignored - tests::tests::should_panic_and_does
├ Failed - tests::tests2::panic - See reason below
├ Pass - tests::tests2::succeed
├ Pass - tests::tests::succeed
├ Failed - tests::tests::should_panic_and_doesnt - See reason below
├ Failed - tests::tests::panic - See reason below
├ Pass - colour_test_green
├ Pass - colour_test_red
├ Ignored - submod::ignore (this is the reason)
├ Ignored - submod::ignore_without_reason
├ Pass - submod::normal_test
├ Pass - submod::panic::should_panic
├ Failed - submod::panic::should_panic_but_didnt - See reason below
├ Failed - submod::panic::panicked - See reason below
├ Pass - submod::panic::should_panic_without_reason
├ Pass - works
├ Pass - from_main_rs
├ Pass - from_integration
├ Ignored - attribute::ignore from tests/integration/src/lib.rs   Doc-test
├ Pass - attribute::no_run from tests/integration/src/lib.rs  Doc-test
├ Pass -  from tests/integration/src/lib.rs  Doc-test
├ Pass - normal_doc_mod from tests/integration/src/lib.rs  Doc-test
├ Pass - empty_doc_mod::private_mod from tests/integration/src/lib.rs  Doc-test
├ Pass - empty_doc_mod from tests/integration/src/lib.rs  Doc-test
├ Pass - normal_doc_mod::private_mod::Item from tests/integration/src/lib.rs  Doc-test
├ Pass - attribute::should_panic from tests/integration/src/lib.rs  Doc-test
├ Pass - normal_doc_mod::Item from tests/integration/src/lib.rs  Doc-test
├ Pass - empty_doc_mod::Item from tests/integration/src/lib.rs  Doc-test
├ Pass - normal_doc_mod::private_mod from tests/integration/src/lib.rs  Doc-test
├ Pass - attribute::edition2018 from tests/integration/src/lib.rs  Doc-test
├ Pass - attribute::should_compile_fail from tests/integration/src/lib.rs  Doc-test
├ Failed - attribute::should_compile_fail_but_didnt from tests/integration/src/lib.rs - See reason below  Doc-test

test result: FAILED. 10 Passed; 5 Failed; 3 Ignored; 0 Measured; 0 Filtered; finished in 0.00s

Command Args

To pass arguments to cargo test put them after a --. For example,

cargo ptest --no-color -- --tests --no-fail-fast -- --color=always

would run cargo test --tests --no-fail-fast -- --color=always and the --no-color argument would be consumed by ptest.

Filtered Commands

The following commands are filtered out before running cargo test as they add extra formatting that the parser cannot handle.

   --nocapture
   -v
   --verbose
   --color=always
   --color=auto
   --color=never
Commit count: 0

cargo fmt