#cargo #junit #test #ci #utility #break #format #report #application #tool

bin+lib cargo-suity

Utility to automate test runs and report results in JUnit format

7 releases

0.3.0 Apr 12, 2021
0.2.1 Feb 25, 2019
0.1.3 Feb 11, 2019

#293 in Testing

Download history 81/week @ 2022-06-04 77/week @ 2022-06-11 45/week @ 2022-06-18 32/week @ 2022-06-25 121/week @ 2022-07-02 94/week @ 2022-07-09 63/week @ 2022-07-16 82/week @ 2022-07-23 54/week @ 2022-07-30 80/week @ 2022-08-06 61/week @ 2022-08-13 108/week @ 2022-08-20 156/week @ 2022-08-27 136/week @ 2022-09-03 147/week @ 2022-09-10 110/week @ 2022-09-17

573 downloads per month

BSD-2-Clause

40KB
862 lines

cargo-suity

Build Status codecov Version

This tool helps you automate testing of you rust application on CI. Currently it can run defined workflows and report results in JUnit format. It's using unstable rust-test feature and may break... Under the good suity executes cargo as sub-process and parses its output.

asciicast

Installation

 $ cargo install -f cargo-suity

Usage

 $ cargo suity

Current version is missing any sort of argument variables. It just runs all of workflows it could find. Which probably covers most of the use cases... In order to view JUnit file you probably need support of your CI (click on azure pipelines badge to see what I'm talking about) or some kind of viewer.

Exit codes

- 0 all tests across all workflows passes
- 101 - ran into error (permission denied, out of disk space, etc)
- N number of failed tests

Configuration (suity.toml)

File is optional. If not specified then default configuration is used. Here is an example configuration:

[global]
features = []
format   = "JUnit"
output   = "./test-results"

[workflow.default]
doc         = false
unit        = true
integration = ["*"]

[workflow.integration-cfg-serde]
doc         = false
unit        = false
integration = ["not_really_a_test"]
  • global is used to override default values in all workflows.
  • workflow.<name> is used to define workflow.

configuration toggles

key description Possible values default
name override name for workflow Any string name part in workflow.<name>
features List of features to use List of any strings crate's default features
format Test result output format JUnit JUnit
output Where to save test results any writeable path ./test-results
doc Test this library's documentation. true / false true
lib Test this package's library. true / false true
integration an array of integration tests files in tests/ folder without extension.) "*" (all of them)

Code quality

Honestly...code is a mess. Only rust-test's json to JUnit part is covered by tests. I didn't even try running clippy on it. However, I'm using it other projects and on itself.

Dependencies

~1.3–2MB
~46K SLoC