Crates.io | yamori |
lib.rs | yamori |
version | |
source | src |
created_at | 2025-03-02 04:17:13.109338+00 |
updated_at | 2025-03-02 04:17:13.109338+00 |
description | A test runner and visualizer for command-line applications |
homepage | |
repository | https://github.com/nwiizo/yamori |
max_upload_size | |
id | 1574258 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Yamori is a test runner and visualizer for command-line applications. It allows you to define tests in TOML or YAML format and visualize the results in a terminal UI or run them in CLI mode.
cargo install yamori
# Clone the repository
git clone https://github.com/nwiizo/yamori.git
cd yamori
# Build and install
cargo install --path .
# Run in TUI mode
yamori --yamori-config tests/configs/tests.toml
# Run in CLI mode
yamori --cli --yamori-config tests/configs/tests.toml
# Using environment variable
YAMORI_CONFIG=tests/configs/tests.toml yamori
You can run Yamori with a specific configuration file using one of the following methods:
Using the -y
or --yamori-config
flag:
yamori --yamori-config tests/configs/tests.yaml
Using the YAMORI_CONFIG
environment variable:
YAMORI_CONFIG=tests/configs/tests.yaml yamori
The environment variable takes precedence over the command-line flag if both are specified.
You can run Yamori in CLI mode (without the TUI interface) using the -c
or --cli
flag:
yamori --cli --yamori-config tests/configs/tests.yaml
Or with the environment variable:
YAMORI_CONFIG=tests/configs/tests.yaml yamori --cli
In CLI mode, Yamori will run all tests and display a compact summary of the results. Only failed tests will show detailed information. This is useful for CI/CD pipelines or when you want a quick overview of test results.
Yamori supports both TOML and YAML configuration files. The file format is automatically detected based on the file extension (.toml
, .yaml
, or .yml
).
# Global build configuration
[build]
release = false
pre_build_commands = ["echo 'Global build preparation'"]
# Test definitions
[[tests]]
name = "Echo Test"
command = "echo"
args = ["Hello, World!"]
expected_output = "Hello, World!"
timeout_secs = 5
[tests.build]
release = false
pre_build_commands = ["echo 'Preparing Echo Test'"]
[[tests]]
name = "Word Count Test"
command = "wc"
args = ["-w"]
input = "This is a test sentence with exactly eight words."
expected_output = "8"
timeout_secs = 5
In the terminal UI:
q
: Quit?
: Toggle helpj
or Down Arrow: Move downk
or Up Arrow: Move uph
or Left Arrow: Previous tabl
or Right Arrow: Next tabr
: Re-run testsb
: Toggle release modeR
: Run tests in release modeH
: Toggle history viewEsc
: Close help/popupFor detailed documentation, please see:
yamori/
├── src/ # Source code
├── docs/ # Documentation
├── scripts/ # Helper scripts
├── examples/ # Example applications
└── tests/
└── configs/ # Test configuration files
Contributions are welcome! Please feel free to submit a Pull Request.