Fix formatter crash when diffing takes too long
Ensure parallel matches in assert propagate type information
Module
114 changes across 45 versions
Changes by version
Fix formatter crash when diffing takes too long
Ensure parallel matches in assert propagate type information
Set a process label for each test
Fix crash when diffing bitstring specifiers
Support parameterized tests on ExUnit.Case
Support test groups: tests in the same group never run concurrently
Do not alternative sync/async suites on --repeat-until-failure
Propagate the test process itself as a caller in start_supervised
Include max cases in ExUnit reports
Properly compared pinned values when building diffs
Raise on incorrectly dedented doctests
Add more color configuration to ExUnit CLI formatter
Fix crash when @tag capture_log: true was set to true and the Logger application was shut down in the middle of the test
Do not merge context as tags inside the runner to reduce memory usage when emitting events to formatters
Mark test cases as invalid when an exit occurs during setup_all
Do not expand or collect vars from quote in ExUnit assertions
Return values from running doctests and make their order consistent
Do not run duplicate cases on ExUnit.run/1
Add ExUnit.Callbacks.start_link_supervised!/2
Add ExUnit.run/1 to rerun test modules
Colorize summary in yellow with message when all tests are excluded
Display friendly error when test name is too long
Do not crash when diffing unknown bindings in guards
Properly print diffs when comparing improper lists with strings at the tail position
Add short hash to tmp_dir in ExUnit to avoid test name collision
Do not store logs in the CLI formatter (this reduces memory usage for suites with capture_log)
Run ExUnit.after_suite/1 callback even when no tests run
Fix scenario where setup with imported function from within describe failed to compile
Show hint if comparing different but equivalent strings
Fix formatter and counters from ExUnit.run/0 to consider all tests in a module whenever if a module's setup_all fails
Allow doctests newlines to be terminated by CRLF
Intercept SIGQUIT (via Ctrl+\) and show a list of all aborted tests as well as intermediate test results
Interpolate module attributes in match assertions diffs
Print how much time is spent on async vs sync tests
Improve error messages for doctests
Compile doctests faster (often by two times)
Add ExUnit.async_run/0 and ExUnit.await_run/1
Add support for coloring on Windows 10 consoles/shells
Add ExUnit.fetch_test_supervisor/0
Add @tag :tmp_dir support to ExUnit. The temporary directory is automatically created and pruned before each test
Add file and line to ExUnit's --trace
Ensure assert_receive produces valid exception messages in case of errors
Allow multiple :exclude on configuration/CLI
Raise error if attempting to run single line tests on multiple files
Return proper error on duplicate child IDs on start_supervised
Add ExUnit.after_suite/1 callback
Fix compiler warnings in assert_receive/3
Show code snippet from test source file in case of test errors
Use Exception.blame/3 when formatting test errors
Make assert_raise/2 fail if the underlying exception has a broken message/1 implementation
Add start_supervised/2 and stop_supervised/1 to ExUnit. Processes started by this function are automatically shut down when the test exits
Properly account failed tests when setup_all fails
Fix a race condition in assert_receive where we would assert a message was not received but show it in the list of messages when the message is delivered right after the timeout value
Using GenEvent to implement ExUnit formatters is deprecated. Please use the new GenServer based formatters instead
Make ExUnit server timeout configurable
Show pinned variables on failed assert ^left = right and assert match?(^left, right) assertions
Add ExUnit.Case.register_attribute which allow attributes to be cleaned up whenever a test is defined
Add ExUnit.Case.register_test and support the ability to tag "tests" by type. This will allow projects like QuickCheck to change the wording in formatters to say "10 properties" instead of "10 tests"
Support diffing of values when using == in assert
Start running tests as soon as cases are loaded. This feature is enabled by default when running tests through Mix
Raise a straight-forward error message in case a duplicate test name is defined
Bump the default number of max cases to double of schedulers to support both IO and CPU bound tests
Support for named setups in setup and setup_all
Support for bundling tests together with describe/2
Do not provide negative line numbers without generated annotation (for compatibility with Erlang 19)
Raise if trying to override reserved tag in setup blocks
Ensure assert macros can be used from quoted code
Do not warn in match assertion if variable is reused in pattern
Allow one test to raise multiple errors. The goal is to enable tools in the ecosystem to emit multiple failure reports from the same test
Support @tag report: [:foo, :bar] which will include the values for tags :foo and :bar whenever a test fails
Include file and line in all compilation errors for doctests
Fix assertion errors with more than 1 pinned var
Add number of skipped tests to ExUnit output
Make timeout configurable for the whole test suite via the :timeout configuration
Allow moduledoc to be filtered/skipped in doctests
Provide built-in log capturing functionality
Allow assert_receive_timeout and refute_receive_timeout to be configured in the ExUnit application
Allow tests to be skipped with @tag :skip or @tag skip: "reason"
Add tests without implementation (missing the do block) which automatically fail. Such tests are also automatically tagged as :not_implemented, allowing them to be skipped
Increase by default stacktrace depth to 20 (this value is also configurable)
Improve formatting on assert_raise errors for message mismatch
Improve formatting on assert_receive when using pinned variables
Skipped tests now correctly count towards the total of tests in the result returned by ExUnit.run/0
Fix a bug where failures when inspecting data structure or retrieving error messages could bring the whole ExUnit runner down
Do not change the semantics of evaluated code with assert/refute. For example, from now on, assert nil = some_expr() will now raise as expected, as the expression still evaluates to a falsy value
Report proper line number for doctest failures
Fix StringIO processes leakage in the ExUnit.CaptureIO when there are errors inside the capture_io block
Include stacktraces in ExUnit timeouts
Match the line filter by proximity instead of exact match
The test process now exits with :shutdown reason
Add on_exit/1 callbacks that are guaranteed to run once the test process exits and always in another process
teardown/2 and teardown_all/2 are deprecated in favor of on_exit/1 callbacks
Ensure the formatter doesn't error when printing :EXITs
ExUnit.Test and ExUnit.TestCase has been converted to structs
The test and callback context has been converted to maps
Ensure doctest failures are properly reported
Randomize cases and tests suite runs, allow seed configuration and the --seed flag via mix test
Support --only for filtering when running tests with mix test
Raise an error if another capture_io process already captured the device
Improve formatter to show source code and rely on lhs and rhs (instead of expected and actual)
Ensure ExUnit.Assertions does not emit compiler warnings for assert_receive
Formatters are now required to be a GenEvent and ExUnit.run/2 returns a map with results
CaptureIO returns an empty string instead of nil when there is no capture
Support @moduletag in ExUnit cases
:include in ExUnit only has effect if a test was previously excluded with :exclude
Only run setup_all and teardown_all if there are tests in the case
Support :include and :exclude configuration options to filter which tests should run based on their tags. Those options are also supported via mix test as --include and --exclude
Allow doctests to match against #MyModule<>
Improve checks and have better error reports on poorly aligned doctests
Show failures on CLIFormatter as soon as they pop up
Doctests no longer eat too much space and provides detailed reports for poorly indented lines
The :trace option now also reports run time for each test
Add support for :color to enable/disable ANSI coloring
Support trace: true option which gives detailed reporting on test runs