Eksperimental
9ae79d1385
Format numbers with underscores to improve readability ( #14735 )
2025-08-30 19:25:48 +02:00
Noah Betzen
677e1ec8b1
Add mix test --dry-run flag ( #14499 )
2025-07-11 09:49:47 +02:00
Jonatan Männchen
980500551c
Inline Licence Info & Copyright for non-test files ( #14256 )
2025-02-07 21:11:09 +01:00
gpopides
3afc1b3b72
Add slowest_modules option to mix test ( #13409 )
2024-03-12 19:27:45 +01:00
Steffen Deusch
d75930bb0b
Add --repeat-until-failure to mix test ( #13398 )
2024-03-08 15:31:38 +01:00
kevinferretti
67207f4b75
Improve default ExUnit seed algorithm and allow changing via config ( #12733 )
2023-07-01 19:17:38 +02:00
Jonathan Arnett
926c1c2e4f
Change exit status for test failures to 2 ( #11119 )
2021-07-15 22:37:15 +02:00
José Valim
7d8b5e4831
Raise if trying to add case in the middle of run, closes #9601
2019-11-27 11:15:32 +01:00
José Valim
d2cb89e92b
Update registered process lists, closes #9103
2019-05-31 19:24:17 +02:00
eksperimental
4ed989741e
Introduce ExUnit --max-failures feature
...
This adds the --max-failures flag to `mix test` task.
When N number of failures is reached, the suite will
be aborted, and return a the total number of tests
finished upto that moment, along with the failures.
If a module is invalid, all its tests are counted as
as failure even though they are reported as invalid.
2018-10-12 16:00:02 +02:00
Devon Estes
07fa8bb8e1
Implement ExUnit.after_suite/1 callback ( #8087 )
...
It is executed upon the completion of the test suite.
2018-08-16 12:19:31 +02:00
José Valim
65c378dfac
Format first file and mix.exs scripts
2017-10-08 19:34:44 +02:00
José Valim
59930950bb
Remove incorrect wording regarding test cases
...
Previously, we would use `case` to refer to the whole module
but a `case` is actually a *single test*. We have fixed this
by introducing a new `ExUnit.TestModule` struct and by adding
a new attribute called `:module` to the relevant places.
The changes were kept backwards compatible but we do recommend
developers to:
* Access the `:module` field instead of `:case` field
* Replace the `:case_started` and `:case_finished` callbacks
in their formatters by `:module_started` and `:module_finished`
The previous callbacks will continue to receive `ExUnit.TestCase`
structs but the new callbacks will receive `ExUnit.TestModule`.
Unfortunately those field names and callbacks cannot be deprecated,
so they will be one of the backwards incompatible changes required
for Elixir 2.0.
2017-08-24 12:20:09 +02:00
Aleksei Magusev
d582db9a88
Use MixProject instead of Mixfile in mix.exs files
2017-08-20 21:40:23 +02:00
Parker Selbert
25a1fca47c
Add mix test --slowest reporting to ExUnit ( #6385 )
...
This adds a "--slowest N" CLI flag to "mix test", which will print
timing information for the slowest test times. To ensure that reported
times are accurate enabling slow reporting will automatically set the
suite in "--trace" mode.
The "slowest" setting defaults to "0", disabling it for normal test
runs. Setting it to any positive integer will report a cumalitve slow
test time, slow tests as a percentage of total time, and display
individual timings for each of the slowest tests.
2017-07-29 23:04:11 +01:00
Wojtek Mach
b3e9022e34
Use new mix.exs style in docs, core apps mix.exs and generated README ( #6215 )
2017-06-12 10:05:41 +02:00
Aleksei Magusev
6124b03e7a
Use System.schedulers_online/0 where possible
2017-03-26 15:14:14 +02:00
Eric Meadows-Jönsson
af736164fc
Expose generated seed and max_cases options ( #5862 )
...
* Order list of ex_unit options
* Expose generated seed and max_cases options
* Document describetag
* :trace option overrides :max_cases
* Update keyword options instead of application env
2017-03-13 15:27:08 +01:00
Jeff Gulbronson
17c084aea4
Make ExUnit server timeout configurable
...
Signed-off-by: José Valim <jose.valim@plataformatec.com.br >
2016-08-24 18:19:44 +02:00
José Valim
1397684898
Set ex_unit stacktrace to 20 by default, closes #3705
2015-09-11 10:48:39 +02:00
Martin Schürrer
729f4cad17
Introduce :capture_log ExUnit configuration.
2015-08-11 16:10:16 +02:00
José Valim
eb7b5ecc94
Read assert and refute receive timeouts from ex_unit config
2015-05-25 10:26:10 +02:00
José Valim
f14879eb7a
Improve error message and increase test timeout to 60 seconds
2015-05-08 15:48:35 +02:00
Lauro Caetano
b617183400
Set the timeout to infinity when trace option is true
2015-02-09 11:28:37 -02:00
Lauro Caetano
7d44e4cdfc
Add the timeout option for tests
...
This option enables the global timeout configuration for running the
tests.
Example:
```
ExUnit.start(timeout: 60_000)
```
2015-02-06 17:02:12 -02:00
José Valim
2e486f552b
Deprecate IO.ANSI.terminal? and tidy up colors
2014-07-31 13:54:08 +02:00
José Valim
55d0f568da
Improve docs and code regarding ansi formatting
2014-05-08 21:09:34 +02:00
José Valim
8b203a8379
Use IO.ANSI.Docs to format mix help
2014-05-08 20:13:29 +02:00
José Valim
56f15d9f4e
Do not add spaces after { and before }
...
This makes the source code consistent with the result
returned by inspect/2.
2014-04-21 19:06:35 +02:00
Peter Minten
c151739415
Use a gen_server for exunit formatter dispatch
...
This allows multiple formatters per run.
Signed-off-by: José Valim <jose.valim@plataformatec.com.br >
2014-02-11 10:26:01 +01:00
José Valim
294885be1a
Default build_per_environment to true
2014-02-01 12:55:30 +01:00
vanstee
d4729a3795
Add support for include and exclude flags
2013-12-16 14:48:37 -05:00
vanstee
05a321dc8c
Ensure filter is always a list
2013-12-02 20:13:51 -05:00
José Valim
056069071c
Set ExUnit color based on IO.ANSI.terminal?, closes #1756
2013-10-16 10:05:26 +02:00
José Valim
cbec463554
Make ExUnit autorun configurable
2013-10-13 14:15:19 +02:00
José Valim
d77d013b32
Support --color option in ExUnit
...
The option can also be passed via mix, closes #1364
2013-07-25 12:31:18 +02:00
José Valim
cdd8e5862d
Rename the ExUnit option from debug to trace
2013-07-01 16:41:34 +02:00
José Valim
eee1993cdd
Update CHANGELOG
2013-07-01 15:14:38 +02:00
José Valim
0703be3863
Support :debug option on ExUnit
2013-07-01 14:18:22 +02:00
José Valim
a6ddf3a736
ExUnit now defines proper application and supervisor callbacks
2012-12-05 22:11:11 +01:00
José Valim
d857b7b3f5
MixFile -> Mixfile
2012-07-31 15:37:04 +02:00
José Valim
c9756b55f2
Add run and deps.loadpaths to mix
2012-07-19 16:00:31 +02:00
José Valim
ba17e8ac78
Use mix to generate .app files
2012-07-19 08:38:26 +02:00