Skip to content
A home for experiments with custom test frameworks in rust
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
integration_tests
lib_test2
multiprocess_runner
simple
.gitignore
LICENSE
README.md

README.md

rust-test-frameworks

A home for experiments with custom test frameworks in rust

All examples require a build from the custom-test-frameworks branch from: https://github.com/djrenren/rust

High Level Architecture

The goal is to allow user-defined crates to fulfill tests.

Today we mark tests like so:

#[test]
fn foo() {
  //...
}

These tests are aggreggated and run by rust's internal libtest framework. If we want custom reporting or different execution behavior we're stuck. Now we can write something like so:

#![test_runner(crate::my_runner)]

fn my_runner(ts: &[&Fn(i32) -> bool]) {
  //...
}

#[test_case]
fn foo(a: i32) -> bool {

}

test_case performs basic aggregation and the test_runner crate attribute specifies what function will receive the tests.

You can’t perform that action at this time.