Struct sqlness::Runner

source ·
pub struct Runner<E: EnvController> { /* private fields */ }
Expand description

The entrypoint of this crate.

To run your integration test cases, simply new a Runner and run it.

async fn run_integration_test() {
    let runner = Runner::new(root_path, env).await;
    runner.run().await;
}

For more detailed explaination, refer to crate level documentment.

Implementations§

Examples found in repository?
examples/bad.rs (line 57)
51
52
53
54
55
56
57
58
59
60
61
62
63
64
async fn main() {
    let env = MyController;
    let config = ConfigBuilder::default()
        .case_dir("examples/bad-case".to_string())
        .build()
        .unwrap();
    let runner = Runner::new_with_config(config, env)
        .await
        .expect("Create Runner failed");

    println!("Run testcase...");

    runner.run().await.unwrap();
}
More examples
Hide additional examples
examples/basic.rs (line 52)
46
47
48
49
50
51
52
53
54
55
56
57
58
59
async fn main() {
    let env = MyController;
    let config = ConfigBuilder::default()
        .case_dir("examples/basic-case".to_string())
        .build()
        .unwrap();
    let runner = Runner::new_with_config(config, env)
        .await
        .expect("Create Runner failed");

    println!("Run testcase...");

    runner.run().await.unwrap();
}
Examples found in repository?
examples/bad.rs (line 63)
51
52
53
54
55
56
57
58
59
60
61
62
63
64
async fn main() {
    let env = MyController;
    let config = ConfigBuilder::default()
        .case_dir("examples/bad-case".to_string())
        .build()
        .unwrap();
    let runner = Runner::new_with_config(config, env)
        .await
        .expect("Create Runner failed");

    println!("Run testcase...");

    runner.run().await.unwrap();
}
More examples
Hide additional examples
examples/basic.rs (line 58)
46
47
48
49
50
51
52
53
54
55
56
57
58
59
async fn main() {
    let env = MyController;
    let config = ConfigBuilder::default()
        .case_dir("examples/basic-case".to_string())
        .build()
        .unwrap();
    let runner = Runner::new_with_config(config, env)
        .await
        .expect("Create Runner failed");

    println!("Run testcase...");

    runner.run().await.unwrap();
}

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.