liveBook · Manning

Mix test

As explained in Elixir in Action, Third Edition

mix test is a Mix command that runs the tests of an Elixir project.

mix test runs an Elixir project's tests from its Mix project directory. It provides the practical test-running step after project generation and compilation. section 7.1 section 2.7.2

Use it alongside other Mix commands: mix new creates the project, mix compile builds lib files, and mix test executes the generated test suite. section 7.1 section 2.7.2

$ mix test
..

Finished in 0.03 seconds
2 tests, 0 failures

A minimal successful run reports progress, elapsed time, the number of tests, and failures. section 2.7.2

How Elixir in Action, Third Edition covers it

How deep it goes
Shows invocation and sample output but defers detailed Mix behavior and test implementation.
Examples
Uses generated tests and reports two tests with zero failures in a sample command-line run.
What it assumes
Assumes a Mix project directory and introduces testing as a standard project command alongside compilation.
What you can do after
Apply it via Mix to execute a project's tests and inspect the resulting test and failure counts.
How it connects
Connects Mix projects with project generation, compilation, and the Elixir runtime load path.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Elixir in Action, Third Edition. The section links point to the parts of the book it draws on.