#[test] and external test harnesses

An important requirement for me that I rarely see mentioned is that I need to be able to decouple the test running from the test generation, for example I want to be able to run tests written in any Rust test framework in a Visual Studio GUI.

In this respect I like the internal design of Rust’s test framework - it is just a list of functions to run with some metadata about what the outcome is expected to be. If other test frameworks can compile down to a list of functions that makes the interface to the test runner very simple (e.g. we don’t have to define any specific setup/teardown interface if the frameworks can bake them into the test cases they generate).

Edit: I’m also less enthusiastic than @alexcrichton about adding implicit crate dependencies based on Cargo.toml.

3 Likes