Skip to main content

main

Attribute Macro main 

Source
#[main]
Expand description

Collect and run the end-to-end tests with Doco

This macro makes it very easy to use the [doco] testing framework. It collects all tests that are annotated with the [doco::test] macro, initializes the test runner, and then runs each test in an isolated, ephemeral environment.

§Example

use doco::{Doco, Server};

#[doco::main]
async fn main() -> Doco {
    let server = Server::builder()
        .image("crccheck/hello-world")
        .tag("v1.0.0")
        .port(8000)
        .build();

    Doco::builder().server(server).build()
}