Muex. Runner
(Muex v0.13.1)
View Source
Runs tests against mutated code.
Executes the test suite for each mutation and classifies the results.
Summary
Functions
Runs all mutations in parallel using a global worker pool with sandbox isolation.
Types
@type mutation_result() :: %{ mutation: map(), result: result(), duration_ms: non_neg_integer(), error: term() | nil, test_files: [String.t()] }
@type result() ::
:killed | :survived | :invalid | :timeout | :equivalent | :no_coverage
Functions
@spec run_all( [map()], %{required(Path.t()) => map()}, module(), map(), map(), keyword() ) :: [mutation_result()] | {:partial, [mutation_result()], Muex.Reporter.partial()} | {:error, String.t()}
Runs all mutations in parallel using a global worker pool with sandbox isolation.
Mutations targeting different files run concurrently. Mutations targeting the same file are serialized via per-file locking.
Parameters
mutations- List of all mutations to test (across all files)file_entries- Map of file paths to file entry mapslanguage_adapter- The language adapter moduledependency_map- Map of modules to test filesfile_to_module- Map of file paths to module namesopts- Options::max_workers- Maximum concurrent workers (default: 4):timeout_ms- Test timeout in milliseconds (default: 5000):test_paths- List of test path patterns (default: ["test"]):verbose- Show progress (default: false):deadline_ms- Stop starting mutants this many milliseconds after the first one starts; seeMuex.WorkerPool.run_mutations/7(default: none)
Returns
List of mutation_result maps. {:partial, results, info} when a
:deadline_ms stopped the run before every mutant started. {:error, reason}
when the run was refused before any mutant ran (see Muex.Sandbox.Error) or
stopped because something outside the mutants is broken.