Module

ExUnit

Changes by version

Elixir 1.19.4

· 2 changes

Bugfix Tool: ExUnit

Fix formatter crash when diffing takes too long

Bugfix Tool: ExUnit

Ensure parallel matches in assert propagate type information

Elixir 1.19.0

· 1 change

Enhancement Tool: ExUnit

Set a process label for each test

Elixir 1.18.2

· 1 change

Bugfix Tool: ExUnit

Fix crash when diffing bitstring specifiers

Elixir 1.18.0

· 2 changes

Enhancement Tool: ExUnit

Support parameterized tests on ExUnit.Case

Enhancement Tool: ExUnit

Support test groups: tests in the same group never run concurrently

Elixir 1.17.1

· 1 change

Bugfix Tool: ExUnit

Do not alternative sync/async suites on --repeat-until-failure

Elixir 1.17.0

· 2 changes

Enhancement Tool: ExUnit

Propagate the test process itself as a caller in start_supervised

Enhancement Tool: ExUnit

Include max cases in ExUnit reports

Elixir 1.16.2

· 1 change

Bugfix Tool: ExUnit

Properly compared pinned values when building diffs

Elixir 1.16.0

· 1 change

Bugfix Tool: ExUnit

Raise on incorrectly dedented doctests

Elixir 1.15.0

· 5 changes

Enhancement Tool: ExUnit

Add more color configuration to ExUnit CLI formatter

Bugfix Tool: ExUnit

Fix crash when @tag capture_log: true was set to true and the Logger application was shut down in the middle of the test

Bugfix Tool: ExUnit

Do not merge context as tags inside the runner to reduce memory usage when emitting events to formatters

Bugfix Tool: ExUnit

Mark test cases as invalid when an exit occurs during setup_all

Bugfix Tool: ExUnit

Do not expand or collect vars from quote in ExUnit assertions

Elixir 1.14.3

· 1 change

Enhancement Tool: ExUnit

Return values from running doctests and make their order consistent

Elixir 1.14.2

· 1 change

Bugfix Tool: ExUnit

Do not run duplicate cases on ExUnit.run/1

Elixir 1.14.0

· 10 changes

Enhancement Tool: ExUnit

Add ExUnit.Callbacks.start_link_supervised!/2

Enhancement Tool: ExUnit

Add ExUnit.run/1 to rerun test modules

Enhancement Tool: ExUnit

Colorize summary in yellow with message when all tests are excluded

Enhancement Tool: ExUnit

Display friendly error when test name is too long

Bugfix Tool: ExUnit

Do not crash when diffing unknown bindings in guards

Bugfix Tool: ExUnit

Properly print diffs when comparing improper lists with strings at the tail position

Bugfix Tool: ExUnit

Add short hash to tmp_dir in ExUnit to avoid test name collision

Bugfix Tool: ExUnit

Do not store logs in the CLI formatter (this reduces memory usage for suites with capture_log)

Bugfix Tool: ExUnit

Run ExUnit.after_suite/1 callback even when no tests run

Bugfix Tool: ExUnit

Fix scenario where setup with imported function from within describe failed to compile

Elixir 1.13.0

· 3 changes

Enhancement Tool: ExUnit

Show hint if comparing different but equivalent strings

Bugfix Tool: ExUnit

Fix formatter and counters from ExUnit.run/0 to consider all tests in a module whenever if a module's setup_all fails

Bugfix Tool: ExUnit

Allow doctests newlines to be terminated by CRLF

Elixir 1.12.0

· 6 changes

Enhancement Tool: ExUnit

Intercept SIGQUIT (via Ctrl+\) and show a list of all aborted tests as well as intermediate test results

Enhancement Tool: ExUnit

Interpolate module attributes in match assertions diffs

Enhancement Tool: ExUnit

Print how much time is spent on async vs sync tests

Enhancement Tool: ExUnit

Improve error messages for doctests

Enhancement Tool: ExUnit

Compile doctests faster (often by two times)

Enhancement Tool: ExUnit

Add ExUnit.async_run/0 and ExUnit.await_run/1

Elixir 1.11.0

· 4 changes

Enhancement Tool: ExUnit

Add support for coloring on Windows 10 consoles/shells

Enhancement Tool: ExUnit

Add ExUnit.fetch_test_supervisor/0

Enhancement Tool: ExUnit

Add @tag :tmp_dir support to ExUnit. The temporary directory is automatically created and pruned before each test

Enhancement Tool: ExUnit

Add file and line to ExUnit's --trace

Elixir 1.10.1

· 1 change

Bugfix Tool: ExUnit

Ensure assert_receive produces valid exception messages in case of errors

Elixir 1.9.0

· 3 changes

Enhancement Tool: ExUnit

Allow multiple :exclude on configuration/CLI

Bugfix Tool: ExUnit

Raise error if attempting to run single line tests on multiple files

Bugfix Tool: ExUnit

Return proper error on duplicate child IDs on start_supervised

Elixir 1.8.0

· 1 change

Enhancement Tool: ExUnit

Add ExUnit.after_suite/1 callback

Elixir 1.5.3

· 1 change

Bugfix Tool: ExUnit

Fix compiler warnings in assert_receive/3

Elixir 1.5.0

· 5 changes

Enhancement Tool: ExUnit

Show code snippet from test source file in case of test errors

Enhancement Tool: ExUnit

Use Exception.blame/3 when formatting test errors

Enhancement Tool: ExUnit

Make assert_raise/2 fail if the underlying exception has a broken message/1 implementation

Enhancement Tool: ExUnit

Add start_supervised/2 and stop_supervised/1 to ExUnit. Processes started by this function are automatically shut down when the test exits

Bugfix Tool: ExUnit

Properly account failed tests when setup_all fails

Elixir 1.4.0

· 2 changes

Bugfix Tool: ExUnit

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

Enhancement Tool: ExUnit

Using GenEvent to implement ExUnit formatters is deprecated. Please use the new GenServer based formatters instead

Elixir 1.3.3

· 1 change

Enhancement Tool: ExUnit

Make ExUnit server timeout configurable

Elixir 1.3.0

· 9 changes

Enhancement Tool: ExUnit

Show pinned variables on failed assert ^left = right and assert match?(^left, right) assertions

Enhancement Tool: ExUnit

Add ExUnit.Case.register_attribute which allow attributes to be cleaned up whenever a test is defined

Enhancement Tool: ExUnit

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"

Enhancement Tool: ExUnit

Support diffing of values when using == in assert

Enhancement Tool: ExUnit

Start running tests as soon as cases are loaded. This feature is enabled by default when running tests through Mix

Enhancement Tool: ExUnit

Raise a straight-forward error message in case a duplicate test name is defined

Enhancement Tool: ExUnit

Bump the default number of max cases to double of schedulers to support both IO and CPU bound tests

Enhancement Tool: ExUnit

Support for named setups in setup and setup_all

Enhancement Tool: ExUnit

Support for bundling tests together with describe/2

Elixir 1.2.3

· 1 change

Enhancement Tool: Elixir

Do not provide negative line numbers without generated annotation (for compatibility with Erlang 19)

Elixir 1.2.2

· 1 change

Enhancement Tool: Elixir

Raise if trying to override reserved tag in setup blocks

Elixir 1.2.1

· 2 changes

Enhancement Tool: Elixir

Ensure assert macros can be used from quoted code

Enhancement Tool: Elixir

Do not warn in match assertion if variable is reused in pattern

Elixir 1.2.0

· 3 changes

Enhancement Tool: ExUnit

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

Enhancement Tool: ExUnit

Support @tag report: [:foo, :bar] which will include the values for tags :foo and :bar whenever a test fails

Bugfix Tool: ExUnit

Include file and line in all compilation errors for doctests

Elixir 1.1.1

· 1 change

Enhancement Tool: Elixir

Fix assertion errors with more than 1 pinned var

Elixir 1.1.0

· 14 changes

Enhancement Tool: ExUnit

Add number of skipped tests to ExUnit output

Enhancement Tool: ExUnit

Make timeout configurable for the whole test suite via the :timeout configuration

Enhancement Tool: ExUnit

Allow moduledoc to be filtered/skipped in doctests

Enhancement Tool: ExUnit

Provide built-in log capturing functionality

Enhancement Tool: ExUnit

Allow assert_receive_timeout and refute_receive_timeout to be configured in the ExUnit application

Enhancement Tool: ExUnit

Allow tests to be skipped with @tag :skip or @tag skip: "reason"

Enhancement Tool: ExUnit

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

Enhancement Tool: ExUnit

Increase by default stacktrace depth to 20 (this value is also configurable)

Enhancement Tool: ExUnit

Improve formatting on assert_raise errors for message mismatch

Enhancement Tool: ExUnit

Improve formatting on assert_receive when using pinned variables

Bugfix Tool: ExUnit

Skipped tests now correctly count towards the total of tests in the result returned by ExUnit.run/0

Bugfix Tool: ExUnit

Fix a bug where failures when inspecting data structure or retrieving error messages could bring the whole ExUnit runner down

Bugfix Tool: ExUnit

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

Bugfix Tool: ExUnit

Report proper line number for doctest failures

Elixir 1.0.5

· 1 change

Enhancement Tool: Elixir

Fix StringIO processes leakage in the ExUnit.CaptureIO when there are errors inside the capture_io block

Elixir 1.0.1

· 1 change

Enhancement Tool: Elixir

Include stacktraces in ExUnit timeouts

Elixir 0.14.3

· 1 change

Enhancement Tool: Elixir

Match the line filter by proximity instead of exact match

Elixir 0.14.1

· 1 change

Enhancement Tool: Elixir

The test process now exits with :shutdown reason

Elixir 0.14.0

· 2 changes

Enhancement Tool: Elixir

Add on_exit/1 callbacks that are guaranteed to run once the test process exits and always in another process

Enhancement Tool: Elixir

teardown/2 and teardown_all/2 are deprecated in favor of on_exit/1 callbacks

Elixir 0.13.3

· 1 change

Enhancement Tool: Elixir

Ensure the formatter doesn't error when printing :EXITs

Elixir 0.13.2

· 2 changes

Enhancement Tool: Elixir

ExUnit.Test and ExUnit.TestCase has been converted to structs

Enhancement Tool: Elixir

The test and callback context has been converted to maps

Elixir 0.13.1

· 1 change

Enhancement Tool: Elixir

Ensure doctest failures are properly reported

Elixir 0.13.0

· 6 changes

Enhancement Tool: Elixir

Randomize cases and tests suite runs, allow seed configuration and the --seed flag via mix test

Enhancement Tool: Elixir

Support --only for filtering when running tests with mix test

Enhancement Tool: Elixir

Raise an error if another capture_io process already captured the device

Enhancement Tool: Elixir

Improve formatter to show source code and rely on lhs and rhs (instead of expected and actual)

Enhancement Tool: Elixir

Ensure ExUnit.Assertions does not emit compiler warnings for assert_receive

Enhancement Tool: Elixir

Formatters are now required to be a GenEvent and ExUnit.run/2 returns a map with results

Elixir 0.12.4

· 1 change

Enhancement Tool: Elixir

CaptureIO returns an empty string instead of nil when there is no capture

Elixir 0.12.2

· 3 changes

Enhancement Tool: Elixir

Support @moduletag in ExUnit cases

Enhancement Tool: Elixir

:include in ExUnit only has effect if a test was previously excluded with :exclude

Enhancement Tool: Elixir

Only run setup_all and teardown_all if there are tests in the case

Elixir 0.12.1

· 2 changes

Enhancement Tool: Elixir

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

Enhancement Tool: Elixir

Allow doctests to match against #MyModule<>

Elixir 0.10.3

· 1 change

Enhancement Tool: Bug fixes

Improve checks and have better error reports on poorly aligned doctests

Elixir 0.10.2

· 2 changes

Enhancement Tool: Elixir

Show failures on CLIFormatter as soon as they pop up

Enhancement Tool: Elixir

Doctests no longer eat too much space and provides detailed reports for poorly indented lines

Elixir 0.10.1

· 2 changes

Enhancement Tool: Elixir

The :trace option now also reports run time for each test

Enhancement Tool: Elixir

Add support for :color to enable/disable ANSI coloring

Elixir 0.10.0

· 1 change

Enhancement Tool: Elixir

Support trace: true option which gives detailed reporting on test runs