checkmate-cli 0.4.1

Checkmate - API Testing Framework CLI
//! Test runner module for executing API test specifications

mod spec;
mod executor;
mod assertion;
mod result;
pub mod diff;

pub use spec::{TestSpec, TestRequest, TestCase, Assertion, EnvConfig, DiffCase, EndpointDef, RequestRef, SetupStep};
pub use executor::TestExecutor;
pub use assertion::AssertionEvaluator;
pub use result::{TestResult, TestSuiteResult, AssertionResult, TestStatus, AssertionSummary, TestFailure};

use thiserror::Error;

#[derive(Error, Debug)]
pub enum RunnerError {
    #[error("Failed to parse test spec: {0}")]
    ParseError(String),

    #[error("Failed to read file: {0}")]
    IoError(#[from] std::io::Error),

    #[error("YAML parse error: {0}")]
    YamlError(#[from] serde_yaml::Error),

    #[error("HTTP request failed: {0}")]
    HttpError(#[from] reqwest::Error),

    #[error("Assertion failed: {0}")]
    AssertionError(String),

    #[error("Clove evaluation error: {0}")]
    CloveError(String),

    #[error("Request not found: {0}")]
    RequestNotFound(String),

    #[error("Environment variable not set: {0}")]
    EnvNotSet(String),
}