Crates.io | shunit |
lib.rs | shunit |
version | 0.2.0 |
source | src |
created_at | 2022-06-04 08:36:30.601894 |
updated_at | 2022-06-04 12:06:54.308676 |
description | Utility that runs a list of shell scripts and outputs the results in JUnit format for easy use in CI/CD systems. |
homepage | |
repository | https://github.com/SwissArmyRonin/shunit |
max_upload_size | |
id | 599607 |
size | 31,775 |
shunit
runs a list of shell scripts and outputs the results in JUnit format
for easy use in CI/CD systems.
$ cargo install shunit
$ shunit --help
USAGE:
shunit [FLAGS] [OPTIONS] [scripts]...
FLAGS:
-h, --help Prints help information
-q, --quiet Silence all output
-V, --version Prints version information
-v, --verbose Verbose mode (-v, -vv, -vvv, -vvvv). The levels are warnings, informational, debugging, and trace
message
OPTIONS:
-o, --output <output> An optional target file to write the result to
-t, --timestamp <ts> Timestamp (sec, ms, ns, none)
ARGS:
<scripts>... Test scripts
To run the tests in the test folder and generate an JUnit compatible XML output, run:
shunit -o shunit.xml test/*
This will generate a JUnit compatible output file called shunit.xml. The file glob will expand to every script in the test directory, so the final suite will contain the results of running all 4 files (including the one that isn't a script).
The exit code from shunit is 0 if all tests succeeded, and 1 otherwise.