Automatically runs Elixir project tests on file changes to support test-driven development workflows.
Mix test.watch is a Mix task for Elixir that automatically runs a project's tests whenever a file is saved. It streamlines the test-driven development (TDD) workflow by providing immediate feedback without requiring manual test execution each time.
Elixir developers practicing test-driven development who want a faster feedback loop during coding. It is particularly useful for developers working on applications where frequent test runs are beneficial for catching regressions quickly.
Developers choose mix test.watch for its seamless integration into the Elixir ecosystem as a Mix task, its configurability to run additional tasks like Credo, and features like stale test detection and file exclusion that optimize the development workflow.
🎠 Because TDD is awesome
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Runs tests automatically on file save, providing immediate feedback for TDD without manual intervention, streamlining development workflows.
Allows running additional mix tasks like Credo alongside tests through configuration, enabling integrated code quality checks in one command.
Supports the --stale flag to run only tests referencing changed modules, saving time in larger codebases by avoiding full test suites.
Can exclude specific files or directories and watch non-standard extensions, adapting to various project structures like ignoring migrations.
On Linux, requires manual installation of inotify-tools, adding an extra dependency that isn't cross-platform and complicates initial setup.
Lacks built-in interactive features for dynamically selecting or filtering tests, unlike mix_test_interactive which offers more control.
Setting up tasks, exclusions, and options requires editing multiple config files, which can be cumbersome for simple or quick projects.