Muex.Runner (Muex v0.6.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

mutation_result()

@type mutation_result() :: %{
  mutation: map(),
  result: result(),
  duration_ms: non_neg_integer(),
  error: term() | nil
}

result()

@type result() :: :killed | :survived | :invalid | :timeout

Functions

run_all(mutations, file_entries, language_adapter, dependency_map, file_to_module, opts \\ [])

@spec run_all(
  [map()],
  %{required(Path.t()) => map()},
  module(),
  map(),
  map(),
  keyword()
) :: [
  mutation_result()
]

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 maps
  • language_adapter - The language adapter module
  • dependency_map - Map of modules to test files
  • file_to_module - Map of file paths to module names
  • opts - 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)

Returns

List of mutation_result maps