#ExUnit
TIL: `--seed 0` disables the randomization of ExUnit tests, essentially ensuring the tests will run in the declaration order. Very useful when "watching" & using `--max-failures 1` to get consistent output as you TDD hexdocs.pm/ex_unit/1.19...
November 9, 2025 at 9:39 AM
October 9, 2025 at 8:00 AM
Any hints on how to implement resource sharing in ExUnit tests?

For phoenix_test_playwright, I want shared browser instances.
Browser pool, each test module has to wait for available browser in `setup_all`.
github.com/ftes/phoenix...

Have you seen/implemented something similar before?
#elixirlang
Feature request: Limit number of concurrent e2e tests · Issue #75 · ftes/phoenix_test_playwright
Hello 👋 Big thank you for your library, it made it possible to easily test my live_vue project. Just one small question: I enjoy running all my tests with mix test, no matter if they're e2e or not....
github.com
October 6, 2025 at 4:30 PM
News includes interactive #ExUnit testing with mix_test_interactive, TrieHard Rust-powered search library, ReqLLM for unified #LLM interactions, Hologram v0.6.0 production features, funded Rebar4 project, and more! #ElixirLang www.youtube.com/watch?v=Zf9n...
Thinking Elixir Podcast 271: Testing, Searching, and Funding
YouTube video by Mark Ericksen
www.youtube.com
September 23, 2025 at 12:09 PM
Building a good mental model of how ExUnit works internally paid off. I was able to quickly put together a series of diagrams showing how process ownership and on_exit handlers all work together.

My backup talk is pretty much done. I'll be waiting in the bullpen at #ElixirConf 😅
August 24, 2025 at 6:57 PM
The good news is that I know way more about the internals of ExUnit, process ownership, and the Ecto sandbox. The bad news is that this tangent means I have made zero tangible progress on my talk today. #ElixirLang
August 23, 2025 at 8:19 PM
A lot of others pointed nice things so I will add other things

I want to have better alternative to ExCoveralls, ideally built in. Same for ExUnit reporting - built in JUnit XML output or with just compilation data - nice machine readable format that could be ingested by non-Elixir tooling
July 3, 2025 at 10:48 PM
ExUnit log_level macro - Change the log level on a per test basis - www.jasontokoph.com/tidbits/exun...
ExUnit log_level macro - Jason Tokoph
www.jasontokoph.com
June 28, 2025 at 12:17 AM
🐥 Running ExUnit Tests in Elixir Livebook

#ElixirLang #testing #tools
Running ExUnit Tests in Elixir Livebook
#ElixirLang #testing #tools
www.yellowduck.be
June 20, 2025 at 5:05 PM
🐥 Asserting headers and body in Elixir Req.Test with ExUnit

#ElixirLang #ElixirPhoenix #phoenix #testing
Asserting headers and body in Elixir Req.Test with ExUnit
#ElixirLang #ElixirPhoenix #phoenix #testing
www.yellowduck.be
June 11, 2025 at 5:05 PM
🐥 Parameterized tests in Elixir ExUnit

#ElixirLang #pattern #testing
Parameterized tests in Elixir ExUnit
#ElixirLang #pattern #testing
www.yellowduck.be
June 10, 2025 at 5:05 PM
TIL ExUnit has an assert/2, where you can provide a message to show if the assertion fails! This makes communicating intent of tests so much easier.

h/t @richardtaylor.dev who used this in our codebase, never seen it before!

hexdocs.pm/ex_unit/1.12...
ExUnit.Assertions — ExUnit v1.12.3
hexdocs.pm
June 3, 2025 at 8:51 AM
I just tend to not reach for new abstractions when I feel ExUnit is relatively feature complete for my needs. LiveView assertions are a necessary extension, but I tend not to go much past that.
May 2, 2025 at 3:49 PM
I can sort of see the case here, but the dependency addition past exunit feels just a little extra for me. I’d be more inclined to lean towards Claude if I just need to work with a ton of tests that have a patterned nature.

I’m a very dependency anxious user though, others are more adventurous!
May 2, 2025 at 3:33 PM
on a second thought, i’ll log in to read the story later actually 😂 nothing tastes better than some exunit angst
April 13, 2025 at 4:13 AM
Ever found yourself inside an ExUnit test with a caught error on your hands wondering how to fail with this exact error and stacktrace? Well, it's a little too late, but I'm not here to judge, I'm here to show you how
March 22, 2025 at 4:33 PM
That looks excellent! Do you have any plans to try and propose these improvements as a PR for ExUnit directly?
March 5, 2025 at 6:24 PM
ExUnit likes to live dangerously as my proposal to make `assert %{} = foo()` a warning didn't pass. So maybe you will succeed there.
February 6, 2025 at 11:09 AM
Maybe it is a time to PR it into ExUnit itself? I think it could be nice improvement for some test suites out there.
February 6, 2025 at 9:58 AM
TBH I sometimes would like to see something like www.erlang.org/doc/apps/com... available in ExUnit. Developer machines are often more powerful than CI, which mean that we need to scale timeouts to CI needs instead of scaling them to dev machines and then using flag to make waits longer in CI.
ct — common_test v1.27.6
www.erlang.org
February 6, 2025 at 9:50 AM
##ElixirLang crew, I have a puzzle for you.

I'd like to do some cleanup for failed tests that use my custom ExUnit case, but I really don't want to define my own test macro.

Is there a way to query ExUnit for the state of a test from within its on_exit callback?
January 18, 2025 at 1:28 PM
I like your idea for exunit, it would have to be handled like ecto somehow via a macro expression, AFAIK
January 12, 2025 at 5:28 PM
A minor annoyance with ExUnit is when I have to assign something to a variable before I can pattern-match in an assert:

user_id = user.id
assert %{foo: ^user_id} = whatever

I wish I could do it in a single line:

assert %{foo: ^http://user.id} = whatever

#MyElixirStatus @elixir-lang.org
January 12, 2025 at 5:03 PM
Elixir v1.18 released: type checking of function calls, Language Server listeners, built-in JSON, and ExUnit improvements https://lobste.rs/s/2nygrt ##release ##elixir
Elixir v1.18 released: type checking of calls, LSP listeners, built-in JSON, and more
Elixir v1.18 released: type checking of function calls, Language Server listeners, built-in JSON, ExUnit improvements, mix format –migrate, and more
elixir-lang.org
December 19, 2024 at 8:00 PM
Elixir v1.18 released: type checking of function calls, Language Server listeners, built-in JSON, and ExUnit improvements!

elixir-lang.org/blog/2024/1...
December 19, 2024 at 5:45 PM