#junit #shell #utility #list #format #wrapper #scripts #systems #ci-cd #results

app shunit

Utility that runs a list of shell scripts and outputs the results in JUnit format for easy use in CI/CD systems

1 unstable release

Uses new Rust 2021

0.2.0 Jun 4, 2022
0.1.1 Jun 4, 2022

Custom license

12KB
261 lines

README

shunit runs a list of shell scripts and outputs the results in JUnit format for easy use in CI/CD systems.

Usage

$ 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

Example

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.

Dependencies

~5–11MB
~182K SLoC