Skip to main content

GuiCoverage

Struct GuiCoverage 

Source
pub struct GuiCoverage { /* private fields */ }
Expand description

GUI coverage tracker for E2E testing.

Implementations§

Source§

impl GuiCoverage

Source

pub fn new(name: &str) -> Self

Create a new GUI coverage tracker.

Source

pub fn tui_preset(name: &str) -> Self

Create a TUI coverage tracker with common elements pre-registered.

Source

pub fn tsp_tui() -> Self

Create a TSP TUI coverage tracker with all elements.

Source

pub fn tsp_wasm() -> Self

Create a TSP WASM coverage tracker with all elements.

Matches TUI’s 22 elements, 4 screens, 5 journeys for full parity.

Source

pub fn register_element(&mut self, name: &str)

Register an element to track.

Source

pub fn register_screen(&mut self, name: &str)

Register a screen/view to track.

Source

pub fn register_journey(&mut self, name: &str, steps: Vec<&str>)

Register a user journey.

Source

pub fn cover_element(&mut self, name: &str)

Mark an element as covered.

Source

pub fn cover_screen(&mut self, name: &str)

Mark a screen as covered.

Source

pub fn complete_journey(&mut self, name: &str)

Mark a journey as completed.

Source

pub fn log_interaction( &mut self, kind: InteractionKind, target: &str, value: Option<&str>, frame: u64, )

Log an interaction.

Source

pub fn element_coverage(&self) -> f64

Get element coverage percentage (0.0 to 1.0).

Source

pub fn screen_coverage(&self) -> f64

Get screen coverage percentage (0.0 to 1.0).

Source

pub fn journey_coverage(&self) -> f64

Get journey coverage percentage (0.0 to 1.0).

Source

pub fn total_coverage(&self) -> f64

Get overall GUI coverage percentage (0.0 to 1.0).

Source

pub fn meets_threshold(&self, threshold: f64) -> bool

Check if coverage meets threshold.

Source

pub fn is_complete(&self) -> bool

Check if 100% coverage is achieved.

Source

pub fn summary(&self) -> String

Get a summary string.

Source

pub fn uncovered_elements(&self) -> Vec<&str>

Get uncovered elements.

Source

pub fn uncovered_screens(&self) -> Vec<&str>

Get uncovered screens.

Source

pub fn incomplete_journeys(&self) -> Vec<&str>

Get incomplete journeys.

Source

pub fn element_count(&self) -> usize

Get total element count.

Source

pub fn screen_count(&self) -> usize

Get total screen count.

Source

pub fn journey_count(&self) -> usize

Get total journey count.

Source

pub fn has_element(&self, name: &str) -> bool

Check if an element is registered.

Source

pub fn has_screen(&self, name: &str) -> bool

Check if a screen is registered.

Source

pub fn detailed_report(&self) -> String

Generate a detailed coverage report.

Source

pub fn interaction_count(&self) -> usize

Get interaction count.

Source

pub fn name(&self) -> &str

Get name.

Trait Implementations§

Source§

impl Clone for GuiCoverage

Source§

fn clone(&self) -> GuiCoverage

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 GuiCoverage

Source§

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

Formats the value using the given formatter. 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> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V