pub struct TestingFramework { /* private fields */ }Expand description
Automated testing framework
Implementations§
Source§impl TestingFramework
impl TestingFramework
Sourcepub fn run_regression_tests<S: Sampler>(
&mut self,
sampler: &S,
baseline_file: &str,
) -> Result<RegressionReport, String>
pub fn run_regression_tests<S: Sampler>( &mut self, sampler: &S, baseline_file: &str, ) -> Result<RegressionReport, String>
Run regression tests against baseline
Sourcepub fn run_suite_parallel<S: Sampler + Clone + Send + Sync + 'static>(
&mut self,
sampler: &S,
num_threads: usize,
) -> Result<(), String>
pub fn run_suite_parallel<S: Sampler + Clone + Send + Sync + 'static>( &mut self, sampler: &S, num_threads: usize, ) -> Result<(), String>
Run test suite in parallel
Sourcepub fn generate_ci_report(&self) -> Result<CIReport, String>
pub fn generate_ci_report(&self) -> Result<CIReport, String>
Generate CI/CD report
Sourcepub fn add_stress_tests(&mut self)
pub fn add_stress_tests(&mut self)
Add stress test cases
Sourcepub fn detect_environment(&self) -> TestEnvironment
pub fn detect_environment(&self) -> TestEnvironment
Detect test environment
Sourcepub fn export_results(&self, format: &str) -> Result<String, String>
pub fn export_results(&self, format: &str) -> Result<String, String>
Export test results for external analysis
Sourcepub fn add_industry_generators(&mut self)
pub fn add_industry_generators(&mut self)
Add industry-specific test generators
Sourcepub fn compare_samplers<S1: Sampler, S2: Sampler>(
&mut self,
sampler1: &S1,
sampler2: &S2,
sampler1_name: &str,
sampler2_name: &str,
) -> Result<SamplerComparison, String>
pub fn compare_samplers<S1: Sampler, S2: Sampler>( &mut self, sampler1: &S1, sampler2: &S2, sampler1_name: &str, sampler2_name: &str, ) -> Result<SamplerComparison, String>
Generate performance comparison report
Sourcepub fn new(config: TestConfig) -> Self
pub fn new(config: TestConfig) -> Self
Create new testing framework
Sourcepub fn add_category(&mut self, category: TestCategory)
pub fn add_category(&mut self, category: TestCategory)
Add test category
Sourcepub fn add_generator(&mut self, generator: Box<dyn TestGenerator>)
pub fn add_generator(&mut self, generator: Box<dyn TestGenerator>)
Add custom generator
Sourcepub fn add_validator(&mut self, validator: Box<dyn Validator>)
pub fn add_validator(&mut self, validator: Box<dyn Validator>)
Add custom validator
Sourcepub fn generate_suite(&mut self) -> Result<(), String>
pub fn generate_suite(&mut self) -> Result<(), String>
Generate test suite
Sourcepub fn generate_report(&self) -> Result<String, String>
pub fn generate_report(&self) -> Result<String, String>
Generate report
Auto Trait Implementations§
impl Freeze for TestingFramework
impl !RefUnwindSafe for TestingFramework
impl Send for TestingFramework
impl Sync for TestingFramework
impl Unpin for TestingFramework
impl !UnwindSafe for TestingFramework
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> 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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.