pub struct Runner<E: EnvController> { /* private fields */ }Expand description
Implementations§
source§impl<E: EnvController> Runner<E>
impl<E: EnvController> Runner<E>
pub async fn try_new<P: AsRef<Path>>(
config_path: P,
env_controller: E
) -> Result<Self, SqlnessError>
sourcepub async fn new_with_config(
config: Config,
env_controller: E
) -> Result<Self, SqlnessError>
pub async fn new_with_config(
config: Config,
env_controller: E
) -> Result<Self, SqlnessError>
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
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();
}sourcepub async fn run(&self) -> Result<(), SqlnessError>
pub async fn run(&self) -> Result<(), SqlnessError>
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
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();
}