2 releases
Uses new Rust 2024
new 0.1.1 | Apr 2, 2025 |
---|---|
0.1.0 | Apr 2, 2025 |
#84 in #unit-testing
94 downloads per month
Used in 183 crates
(4 directly)
60KB
440 lines
Aloe Test
Aloe Test is a Rust crate designed to facilitate structured unit testing. It provides abstractions and interfaces for running, logging, and managing unit tests through a standardized approach. The crate is built on two main interfaces: UnitTestInterface
and UnitTestRunnerInterface
, which define the methodology for initializing, running, and shutting down unit tests, as well as capturing and responding to test results.
Features
- Unit Test Management: Allows you to design and manage unit tests using
UnitTest
andUnitTestRunner
structures. - Logging and Result Handling: Provides comprehensive logging features for both successful and failed tests, which can be tailored to assert on failures and log test passes.
- Category-Based Test Execution: Run all or specific categories of tests easily, using deterministic or random seeds.
- Interception and Custom Behavior: Implement custom behavior using subclasses of
UnitTestRunner
to handle logging and results effectively.
Getting Started
Include aloe-test
in your Cargo.toml
:
[dependencies]
aloe-test = "0.1.0"
Basic Usage
Create a unit test by subclassing UnitTest
:
struct MyTest;
impl UnitTestInterface for MyTest {
fn initialise(&mut self) {}
fn shutdown(&mut self) {}
fn run_test(&mut self) {
self.begin_test("Example Test");
self.expect(true, Some("Expected success"));
}
}
Use UnitTestRunner
to execute your tests:
let mut runner = UnitTestRunner::new();
runner.run_all_tests(None);
Advanced Features
- Comprehensive result analysis allowing detailed inspection of execution passes and failures.
- Randomization control through seed management for reproducible test scenarios.
License
This project is licensed under the GPL-3.0 License.
Contribution
Contributions are welcome. Please check the GitHub repository here for more details.
This README.md file was generated by an AI model and may not be 100% accurate, however, it should be pretty good.
This crate is a translation of the JUCE module.
JUCE is a c++ software framework for developing high performance audio applications.
Usage falls under the GPLv3 as well as the JUCE commercial license.
See github.com/juce-framework/JUCE and the JUCE license page for details.
This crate is in the process of being translated from c++ to rust. For progress updates, please see the workspacer rust project. designed specifically for rust projects.
Dependencies
~13–27MB
~376K SLoC