pub struct DataDrivenConfig {
pub file_path: String,
pub distribution: DataDistribution,
pub mappings: Vec<DataMapping>,
pub csv_has_header: bool,
pub per_uri_control: bool,
pub per_uri_columns: PerUriColumns,
}Expand description
Configuration for data-driven testing
Fields§
§file_path: StringPath to the data file (CSV or JSON)
distribution: DataDistributionData distribution strategy
mappings: Vec<DataMapping>Column to field mappings
csv_has_header: boolWhether the CSV has a header row
per_uri_control: boolEnable per-URI control mode (each row specifies method, uri, body, etc.)
per_uri_columns: PerUriColumnsPer-URI control column configuration
Implementations§
Source§impl DataDrivenConfig
impl DataDrivenConfig
Sourcepub fn with_distribution(self, distribution: DataDistribution) -> Self
pub fn with_distribution(self, distribution: DataDistribution) -> Self
Set the distribution strategy
Sourcepub fn with_mappings(self, mappings: Vec<DataMapping>) -> Self
pub fn with_mappings(self, mappings: Vec<DataMapping>) -> Self
Add mappings
Sourcepub fn with_per_uri_control(self, enabled: bool) -> Self
pub fn with_per_uri_control(self, enabled: bool) -> Self
Enable per-URI control mode
Sourcepub fn with_per_uri_columns(self, columns: PerUriColumns) -> Self
pub fn with_per_uri_columns(self, columns: PerUriColumns) -> Self
Set custom per-URI column names
Sourcepub fn file_type(&self) -> DataFileType
pub fn file_type(&self) -> DataFileType
Detect file type from extension
Trait Implementations§
Source§impl Clone for DataDrivenConfig
impl Clone for DataDrivenConfig
Source§fn clone(&self) -> DataDrivenConfig
fn clone(&self) -> DataDrivenConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DataDrivenConfig
impl Debug for DataDrivenConfig
Source§impl<'de> Deserialize<'de> for DataDrivenConfig
impl<'de> Deserialize<'de> for DataDrivenConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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§
impl Freeze for DataDrivenConfig
impl RefUnwindSafe for DataDrivenConfig
impl Send for DataDrivenConfig
impl Sync for DataDrivenConfig
impl Unpin for DataDrivenConfig
impl UnwindSafe for DataDrivenConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more