use anyhow::Result;
use azure_devops_rust_api::test;
use std::env;
mod utils;
#[tokio::main]
async fn main() -> Result<()> {
let credential = utils::get_credential()?;
let organization = env::var("ADO_ORGANIZATION").expect("Must define ADO_ORGANIZATION");
let project = env::var("ADO_PROJECT").expect("Must define ADO_PROJECT");
let top_test_runs: i32 = 200;
let test_run_client = test::ClientBuilder::new(credential).build();
println!("The test runs for project are:");
let test_runs = test_run_client
.runs_client()
.list(&organization, &project)
.top(top_test_runs)
.await?
.value;
println!("{test_runs:#?}");
Ok(())
}