pub struct TestReport {
pub total_tests: usize,
pub passed_tests: usize,
pub failed_tests: usize,
pub coverage_percentage: f64,
}Expand description
Test report generation for notebook testing framework
Fields§
§total_tests: usize§passed_tests: usize§failed_tests: usize§coverage_percentage: f64Implementations§
Source§impl TestReport
impl TestReport
Sourcepub fn new(total: usize, passed: usize, failed: usize, coverage: f64) -> Self
pub fn new(total: usize, passed: usize, failed: usize, coverage: f64) -> Self
Create a new test report
§Examples
use ruchy::notebook::testing::report::TestReport;
let report = TestReport::new(100, 95, 5, 80.5);
assert_eq!(report.total_tests, 100);Sourcepub fn success_rate(&self) -> f64
pub fn success_rate(&self) -> f64
Get success rate
§Examples
use ruchy::notebook::testing::report::TestReport;
let report = TestReport::new(100, 95, 5, 80.5);
assert_eq!(report.success_rate(), 0.95);Trait Implementations§
Source§impl Clone for TestReport
impl Clone for TestReport
Source§fn clone(&self) -> TestReport
fn clone(&self) -> TestReport
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 moreAuto Trait Implementations§
impl Freeze for TestReport
impl RefUnwindSafe for TestReport
impl Send for TestReport
impl Sync for TestReport
impl Unpin for TestReport
impl UnwindSafe for TestReport
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