mix_eunit alternatives and similar packages
Based on the "Testing" category.
Alternatively, view mix_eunit alternatives based on common mentions on social networks and blogs.
-
hound
Elixir library for writing integration tests and browser automation -
proper
PropEr: a QuickCheck-inspired property-based testing tool for Erlang -
bypass
Bypass provides a quick way to create a custom plug that can be put in place instead of an actual HTTP server to return prebaked responses to client requests. -
StreamData
Data generation and property-based testing for Elixir. ๐ฎ -
ExVCR
HTTP request/response recording library for elixir, inspired by VCR. -
amrita
A polite, well mannered and thoroughly upstanding testing framework for Elixir -
power_assert
Power Assert in Elixir. Shows evaluation results each expression. -
FakerElixir
[unmaintained] FakerElixir generates fake data for you. -
shouldi
Elixir testing libraries with nested contexts, superior readability, and ease of use -
katt
KATT (Klarna API Testing Tool) is an HTTP-based API testing tool for Erlang. -
FakeServer
FakeServer integrates with ExUnit to make external APIs testing simpler -
Stubr
Stubr is a set of functions helping people to create stubs and spies in Elixir. -
mix_test_interactive
Interactive watch mode for Elixir's mix test. https://hexdocs.pm/mix_test_interactive/ -
mecks_unit
A simple Elixir package to elegantly mock module functions within (asynchronous) ExUnit tests using Erlang's :meck library -
test_selector
Elixir library to help selecting the right elements in your tests. -
factory_girl_elixir
Minimal implementation of Ruby's factory_girl in Elixir. -
toxiproxy_ex
ToxiproxyEx is an Elixir API client for the resilience testing tool Toxiproxy. -
mix_erlang_tasks
Common tasks for Erlang projects that use Mix -
ex_parameterized
This library support parameterized test with test_with_params macro. -
cobertura_cover
Output test coverage information in Cobertura-compatible format -
ex_unit_fixtures
A library for defining modular dependencies (fixtures) for ExUnit tests. -
ElixirMock
Creates clean, concurrent, inspectable mocks from elixir modules
Clean code begins in your IDE with SonarLint
Do you think we are missing an alternative of mix_eunit or a related project?
README
MixEunit
A mix task to execute eunit tests.
- Works in umbrella projects.
- Tests can be in the module or in the test directory.
- Allows the user to provide a list of patterns for tests to run.
Example
mix eunit # run all the tests
mix eunit --verbose "foo*" "*_test" # verbose run foo*.erl and *_test.erl
Installation
Add to your mix.exs
deps:
def deps
[#... existing deps,
{:mix_eunit, "~> 0.2"}]
end
Then
mix deps.get
mix deps.compile
mix eunit
To make the eunit
task run in the :test
environment, add the following
to the project
section of you mix file:
def project
[#... existing project settings,
preferred_cli_env: [eunit: :test]
]
end
Command line options:
A list of patterns to match for test files can be supplied:
mix eunit foo* bar*
The runner automatically adds ".erl" to the patterns.
The following command line switch is also available:
--verbose
,-v
- run eunit with the :verbose option--cover
,-c
- create a coverage report after running the tests--profile
,-p
- show a list of the 10 slowest tests--start
- start applications after compilation--no-color
- disable color output--force
- force compilation regardless of compilation times--no-compile
- do not compile even if files require compilation--no-archives-check
- do not check archives--no-deps-check
- do not check dependencies--no-elixir-version-check
- do not check Elixir version
Project Settings:
The following mix.exs
project settings affect the behavior of mix eunit
.
def project
[
# existing project settings
# run the `eunit` task in the `:test` environment
preferred_cli_env: [eunit: :test],
# set the output directory for `mix eunit --cover` reports
# the default is `./cover` (same as `mix test --cover`)
test_coverage: [output: "_build/#{Mix.env}/cover"]
# set switches that affect every invocation of the eunit task
eunit: [
verbose: false,
cover: true,
profile: true,
start: true,
color: false
]
]
end
Cover:
Note that mix eunit --cover
and mix test --cover
will not in
general cover the same source code with tests and therefore will
typically generate two independent coverage reports. There may be
some overlap if your eunit and ExUnit tests cover some of the same
code.
By default, mix eunit --cover
produces coverage reports in HTML
format in the same cover
directory that mix test --cover
does.
You can override the mix eunit --cover
output directory in your
mix.exs
file as described above.
Test search path:
All ".erl" files in the src and test directories are considered.