pub struct MutationRunOptions {Show 13 fields
pub analysis: AnalysisOptions,
pub scope: MutationRunScope,
pub operators: Option<Vec<Operator>>,
pub allow_side_effects: bool,
pub max_mutants: Option<usize>,
pub allow_dirty: bool,
pub runtime: Option<PathBuf>,
pub concurrency: Option<usize>,
pub time_budget: Option<Duration>,
pub runner_timeout: Option<Duration>,
pub runner_config: Option<PathBuf>,
pub output_paths: Vec<PathBuf>,
pub typecheck: bool,
}Expand description
Options of crate::run_mutation and crate::plan_mutation.
Fields§
§analysis: AnalysisOptionsShared project, config and cache options.
scope: MutationRunScopeThe code to mutate.
operators: Option<Vec<Operator>>The operators to use. None uses each operator.
allow_side_effects: boolKeep mutants near a file system, process, network or database sink. Only an explicit caller option can set this, never project config, because the run has no sandbox copy.
max_mutants: Option<usize>The maximum number of covered mutants to run, in rank order. A
mutant that no dry-run test covers is no_coverage and does not
count. The others become pending.
allow_dirty: boolRun in a dirty git worktree, or outside a git worktree. The run still compares the worktree after the run.
runtime: Option<PathBuf>The JavaScript runtime. None uses the runtime of the runner from
PATH: node for node:test, bun for bun test, and node,
then bun, for Vitest.
concurrency: Option<usize>The number of companion processes. None uses half the logical
cores.
time_budget: Option<Duration>The time budget of the run. Mutants that did not start before it
ends become pending.
runner_timeout: Option<Duration>The timeout of the companion init and the dry run. None uses
120 seconds.
runner_config: Option<PathBuf>The config file of the test runner, for example a separate Vitest
config of the integration tests. A relative path is relative to the
project root. The file must exist inside the project root. None
uses the mutation.runnerConfig config key, else the default config
discovery of the runner. Only the Vitest runner reads a config file.
output_paths: Vec<PathBuf>The files that the caller writes after the run, for example the
--output-file report. The worktree check leaves them out, so an old
report does not make the worktree dirty. A relative path is relative
to the process directory, as the caller writes it.
typecheck: boolType-check each survived mutant through the TypeScript-Go companion
of --type-aware. A survivor whose mutated file does not type-check
becomes compile_error and leaves the score. The run fails before
the tests start when no trusted companion exists.
Trait Implementations§
Source§impl Clone for MutationRunOptions
impl Clone for MutationRunOptions
Source§impl Debug for MutationRunOptions
impl Debug for MutationRunOptions
Auto Trait Implementations§
impl Freeze for MutationRunOptions
impl RefUnwindSafe for MutationRunOptions
impl Send for MutationRunOptions
impl Sync for MutationRunOptions
impl Unpin for MutationRunOptions
impl UnsafeUnpin for MutationRunOptions
impl UnwindSafe for MutationRunOptions
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
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> ⓘ
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> ⓘ
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