Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rachitnigam/runt
A lighweight and parallel snapshot testing framework in rust
https://github.com/rachitnigam/runt
snapshot-testing testing-framework
Last synced: 14 days ago
JSON representation
A lighweight and parallel snapshot testing framework in rust
- Host: GitHub
- URL: https://github.com/rachitnigam/runt
- Owner: rachitnigam
- License: mit
- Created: 2020-03-28T22:45:32.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-08-17T12:10:36.000Z (about 1 year ago)
- Last Synced: 2024-10-04T13:15:24.954Z (about 1 month ago)
- Topics: snapshot-testing, testing-framework
- Language: Rust
- Size: 3.86 MB
- Stars: 26
- Watchers: 4
- Forks: 1
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# RUN Tests (RUNT) [![latest]][crate] [![latest-docs]][docs]
Runt is a lightweight, concurrent, and parallel snapshot testing framework
that requires minimal configuration.
Checkout the [documentation][docs] for explanation of various features.Here is an example of `runt` in action:
![](static/runt.gif)Install the latest version of `runt` using:
```
cargo install runt
```Runt is most useful when you have the following test setup:
- One command that needs to run on many input files.
- Test suites grouped by commands run on the files.
- Test outputs are sent to IO streams (stdout and stderr).
- Test and test suites are unordered.Runt is not useful when you want to do:
- Rich introspective testing of data structures.
- Test suites with complex setups, dependencies, and teardowns.Snapshot testing with runt is extremely flexible. For example, the tests
under `runt-cli-test` test the outputs of the runt CLI.### Building & Developing
- Install [Rust][].
- Run `cargo build --release`. The `runt` executable is generated
under `target/release/runt`.
- Runt is tested using `runt`. Run `runt cli-test` to test runt.### Example
View the [example configuration][conf] for the tests in `cli-test`.
To run the tests, run `runt cli-test`### Alternatives
- **[Turnt][]** is a testing framework that allows for more
complex snapshot comparisons. It's particularly powerful when you have
several intermediate files you'd like to compare. `runt` forgoes the
flexibility of turnt for faster execution and built-in output diffing.
- **[insta][]** enables snapshot testing of inline rust programs. Useful when
the testing intrinsic structure of Rust programs. `runt` operators on
arbitrary shell commands which enables testing CLI programs.
- **[jest][]** is a JavaScript snapshot testing framework that allow
formulation of complex expectation queries.
Runt is used to test several reserach compilers built by the [Capra lab](https://capra.cs.cornell.edu): [Calyx](https://calyxir.org), [Dahlia](https://capra.cs.cornell.edu/dahlia), and [Filament](https://github.com/cucapra/filament).[rust]: https://www.rust-lang.org/tools/install
[turnt]: https://github.com/cucapra/turnt
[insta]: https://docs.rs/insta/0.15.0/insta/
[jest]: https://jestjs.io/
[latest-docs]: https://docs.rs/runt/badge.svg
[docs]: https://docs.rs/runt/latest/runt/
[latest]: https://img.shields.io/crates/v/runt.svg
[crate]: https://crates.io/crates/runt
[conf]: https://github.com/rachitnigam/runt/blob/master/cli-test/runt.toml