markdown-test-report

Crates.iomarkdown-test-report
lib.rsmarkdown-test-report
version0.3.8
sourcesrc
created_at2021-10-14 08:34:50.004387
updated_at2023-02-24 15:52:27.710669
descriptionMarkdown generator for cargo test JSON files
homepage
repositoryhttps://github.com/ctron/markdown-test-report
max_upload_size
id464831
size176,046
Jens Reimann (ctron)

documentation

README

Markdown Test Reports

Converts cargo test results from JSON to Markdown.

Install

Released versions:

cargo install markdown-test-report

From Git:

cargo install --git https://github.com/ctron/markdown-test-report

Usage

Markdown generator for cargo test JSON files

Usage: markdown-test-report [OPTIONS] [INPUT]

Arguments:
  [INPUT]  The filename of the JSON test data. Unnecessary or unparsable lines will be ignored [default: test-output.json]

Options:
  -o, --output <OUTPUT>  The name of the output file
  -d, --no-front-matter  Disable report metadata
  -g, --git <GIT>        git top-level location [default: .]
  -s, --summary          Show only the summary section
  -q, --quiet            Be quiet
  -v, --verbose...       Be more verbose. May be repeated multiple times
  -n, --no-git           Disable extracting git information
  -h, --help             Print help information
  -V, --version          Print version information

JSON output for cargo test

This tool requires the test data output in the JSON format. This can be achieved by running cargo test with additional options:

cargo test -- -Z unstable-options --report-time --format json

Currently, the JSON format option is unstable. Still it does work anyway with stable Rust and didn't change much so far.

Also, might the cargo test command output additional, non-JSON, messages, mixed into the JSON output. The markdown reporter will simply filter out those lines.

Examples

Used by:

Example Screenshot

Commit count: 82

cargo fmt