Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ctron/markdown-test-report
A cargo test report in markdown
https://github.com/ctron/markdown-test-report
cargo markdown rust testing
Last synced: 4 days ago
JSON representation
A cargo test report in markdown
- Host: GitHub
- URL: https://github.com/ctron/markdown-test-report
- Owner: ctron
- License: apache-2.0
- Created: 2021-08-20T16:13:48.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-24T15:52:39.000Z (over 1 year ago)
- Last Synced: 2024-10-31T11:25:12.693Z (13 days ago)
- Topics: cargo, markdown, rust, testing
- Language: Rust
- Homepage:
- Size: 204 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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 filesUsage: 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 The name of the output file
-d, --no-front-matter Disable report metadata
-g, --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:
```shell
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:
* https://drogue-iot.github.io/drogue-cloud-testing/
![Example Screenshot](docs/example1.png)