1 个不稳定版本
0.2.0 | 2022年6月4日 |
---|---|
0.1.1 |
|
#680 在 测试
13KB
261 行
README
shunit
运行一系列shell脚本,并以JUnit格式输出结果,以便在CI/CD系统中轻松使用。
用法
$ 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
示例
要运行 test 文件夹中的测试并生成JUnit兼容的XML输出,请运行
shunit -o shunit.xml test/*
这将生成一个名为shunit.xml的JUnit兼容输出文件。文件通配符会展开到测试目录中的每个脚本,因此最终的套件将包含运行所有4个文件的结果(包括不是脚本的文件)。
shunit的退出码在所有测试都成功时为0,否则为1。
依赖项
~6–13MB
~138K SLoC