Skip to main content

Config

Struct Config 

Source
pub struct Config {
Show 14 fields pub adapter: Option<String>, pub args: Vec<String>, pub timeout: Option<u64>, pub fail_fast: Option<bool>, pub retries: Option<u32>, pub parallel: Option<bool>, pub env: HashMap<String, String>, pub filter: Option<FilterConfig>, pub watch: Option<WatchConfig>, pub output: Option<OutputConfig>, pub adapters: Option<HashMap<String, AdapterConfig>>, pub custom_adapter: Option<Vec<CustomAdapterConfig>>, pub coverage: Option<CoverageConfig>, pub history: Option<HistoryConfig>,
}
Expand description

Configuration loaded from testx.toml.

Fields§

§adapter: Option<String>

Override adapter selection (e.g. “python”, “rust”, “java”)

§args: Vec<String>

Extra arguments to pass to the test runner

§timeout: Option<u64>

Timeout in seconds (0 = no timeout)

§fail_fast: Option<bool>

Stop on first failure

§retries: Option<u32>

Number of retries for failed tests

§parallel: Option<bool>

Run all detected adapters in parallel

§env: HashMap<String, String>

Environment variables to set before running tests

§filter: Option<FilterConfig>

Filtering configuration

§watch: Option<WatchConfig>

Watch mode configuration

§output: Option<OutputConfig>

Output configuration

§adapters: Option<HashMap<String, AdapterConfig>>

Per-adapter configuration overrides

§custom_adapter: Option<Vec<CustomAdapterConfig>>

Custom adapter definitions

§coverage: Option<CoverageConfig>

Coverage configuration

§history: Option<HistoryConfig>

History/analytics configuration

Implementations§

Source§

impl Config

Source

pub fn load(project_dir: &Path) -> Self

Load config from testx.toml in the given directory. Returns Config::default() if no config file exists.

Source

pub fn adapter_config(&self, adapter_name: &str) -> Option<&AdapterConfig>

Get adapter-specific config if available.

Source

pub fn watch_config(&self) -> WatchConfig

Get watch config, or default.

Source

pub fn output_config(&self) -> OutputConfig

Get output config, or default.

Source

pub fn filter_config(&self) -> FilterConfig

Get filter config, or default.

Source

pub fn coverage_config(&self) -> CoverageConfig

Get coverage config, or default.

Source

pub fn history_config(&self) -> HistoryConfig

Get history config, or default.

Source

pub fn is_watch_enabled(&self) -> bool

Check if watch mode is enabled (via config or CLI).

Trait Implementations§

Source§

impl Clone for Config

Source§

fn clone(&self) -> Config

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Config

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Config

Source§

fn default() -> Config

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Config
where Config: Default,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,