Muzak
Muzak is a basic mutation testing library for Elixir. It is the limited, open source version of Muzak Pro. If you're not familiar with mutation testing, you can learn more about it in the guide here.
Getting started
To get started with mutation testing, first add muzak
as a dependency in your mix.exs
file and
set the preferred_cli_env
for muzak
to test
:
defmodule MyApp.Mixfile do
def project do
[
# ...
preferred_cli_env: [muzak: :test]
]
end
# ...
defp deps do
[
# ...
{:muzak, "~> 0.1", only: :test}
]
end
end
You're now ready to get started!
$ mix deps.get
$ mix muzak
Muzak will then randomly generate 25 mutations in your application and run your test suite against
each of them. Each time you run mix muzak
you will see different results.
Configuration
Configuration in Muzak is limited, but you can limit the mutations generated to a single file by
using mix muzak --only path/to/file.ex
. The limit of 25 mutations still exists, but this gives
you control over what is mutated so you can focus your testing.
If you require additional configuration options, Muzak Pro will likely meet all those needs.
Muzak Pro
Muzak Pro is the fully-featured, paid version of Muzak. It includes:
- No limit on the number of generated mutations
- Over a dozen additional mutators
git
integration to make mutation testing in CI blazing fast- Far more configuration options at the command line and with a
.muzak.exs
file - Extensive documentation to help you get the most value possible out of mutation testing
- "Analysis Mode" to identify potentially low-value or duplicate tests in your test suite (coming soon)
- Enhanced reporting, including HTML reports (coming soon)
- Parallel execution through mix test partitioning (coming soon) and by spawning multiple BEAM nodes (experimental)
Muzak Pro costs $29/month, and will be available for subscription soon.