# MixAffected v0.1.0 - Table of Contents > Runs only the tests a change can affect, using mix xref and a compiler-traced test map. ## Pages - [MixAffected](readme.md) - [Changelog](changelog.md) - [Contributing](contributing.md) - [LICENSE](license.md) ## Modules - [MixAffected](MixAffected.md): Nx-style "affected" selection for Elixir projects: given the source files a change touched, which files may now behave differently? - [MixAffected.ChangedFiles](MixAffected.ChangedFiles.md): Where a change set comes from: `--files ` or `--base `. - [MixAffected.Classifier](MixAffected.Classifier.md): Sorts a change set into what it means for test selection. Each changed file gets the first rule that applies - [MixAffected.Config](MixAffected.Config.md): The `affected:` settings of the consuming project, plus the test layout (`:test_paths`, `:test_pattern`) Mix itself uses to find test files. - [MixAffected.Glob](MixAffected.Glob.md): Matches root-relative paths against shell-style globs without touching the filesystem, so deleted files match too. - [MixAffected.Graph](MixAffected.Graph.md): File-level dependency graph of a compiled Mix project. - [MixAffected.Graph.Source](MixAffected.Graph.Source.md): Behaviour for producing a project's raw file dependency graph. - [MixAffected.Graph.Source.XrefDot](MixAffected.Graph.Source.XrefDot.md): `MixAffected.Graph.Source` over `mix xref graph --format dot`, the adapter for Elixir 1.18 (which has no JSON format). - [MixAffected.Graph.Source.XrefJson](MixAffected.Graph.Source.XrefJson.md): `MixAffected.Graph.Source` over `mix xref graph --format json` (Elixir >= 1.19). - [MixAffected.Report](MixAffected.Report.md): Compares a saved selection with the failures of the last full `mix test`. - [MixAffected.Result](MixAffected.Result.md): The answer of `mix affected.files` / `mix affected.test`, and its v1 JSON and text renderings (see the README for the schema). - [MixAffected.Run](MixAffected.Run.md): One selection, end to end: classify the change set, build the graph only if a source changed, build or read the test map only if anything is affected, add the map's protocol-impl edges to the graph, then select. - [MixAffected.Selection](MixAffected.Selection.md): Picks the test files to run from the seeds of a change (changed sources the graph knows, plus changed test files) and the test map. - [MixAffected.TestMap](MixAffected.TestMap.md): Which source files each test file references, built by `mix affected.map` (see `MixAffected.TestMap.Builder`) and stored as an ETF file, by default at `_build/test/mix_affected/test_map.etf`. - [MixAffected.TestMap.Ast](MixAffected.TestMap.Ast.md): Reads a test file's source without compiling it: the modules it names (the fallback when requiring the file fails) and its `affected_by` globs. - [MixAffected.TestMap.Builder](MixAffected.TestMap.Builder.md): Builds a `MixAffected.TestMap` inside the consuming project's VM, the way `mix test` loads tests but without running any: the project must already be compiled (and its apps started, as `mix test` does) by the caller. - [MixAffected.TestMap.Tracer](MixAffected.TestMap.Tracer.md): Compiler tracer for `MixAffected.TestMap.Builder`. While test files are required, records in the `table/0` ETS bag ## Mix Tasks - [mix affected.files](Mix.Tasks.Affected.Files.md): Prints the test files a change set may affect. Run with `MIX_ENV=test`. - [mix affected.map](Mix.Tasks.Affected.Map.md): Builds the test map `mix affected.files` and `mix affected.test` select with, at `_build/test/mix_affected/test_map.etf` or `--map `. Those tasks build it themselves when it is missing. Run with `MIX_ENV=test`. - [mix affected.report](Mix.Tasks.Affected.Report.md): After a full `mix test`, compares ExUnit's failures manifest (the file `mix test --failed` reads) with a selection saved by `mix affected.files --format json`. Run with `MIX_ENV=test`. - [mix affected.test](Mix.Tasks.Affected.Test.md): Runs `mix test` on the affected test files. Takes the input options of `mix affected.files` (`--base` or `--files`, `--map`); everything after `--` goes to `mix test` unchanged. Run with `MIX_ENV=test`.