funboy

funboy

Making Large Elixir Test Suites Faster with Check

Hi,

I built a small utility tool mainly for running test partitions, generating coverage reports, and rerunning failed tests across all partitions.
I managed to speed up test suite from 20min down to 6min :smiley:

check --green run

Why a binary instead of a Mix task?

When you run a Mix task, you often have to wait for the whole project to compile first, especially in large projects. Sometimes you’re waiting longer for compilation than for the task itself.

check avoids that completely. It’s an escript binary that directly runs the commands it needs.

The main feature is test partitioning.

Instead of running all tests one after another, check splits them into multiple partitions and runs them in parallel.

check                # runs tests in 3 partitions by default
check --partitions 6 # use more partitions on bigger machines

Coverage is merged automatically after all partitions finish.

You can also run only tests affected by your changes:

check --only modified_tests

This is quite granular. If you change a single test, only that test is run. If you change a describe setup, only tests in that block are run.

You can find a guide on how to set up your project to run tests using partitions here :crossed_fingers:

Maybe some of you will find it useful too :grinning_face_with_smiling_eyes:

Most Liked

Where Next?

Popular in Dev Env & Tools Top

PJUllrich
I built a devcontainer that makes it safe(-er) to run Claude Code in YOLO mode (--dangerously-skip-permissions) on Elixir&Phoenix pro...
New
jpease
If it’s useful to anyone, here’s a tiny nvim plugin (jpease/hex-outdated.nvim) that shows drift between your mix.exs and packages on hex....
New
New
hauleth
Question as in the title. Are You using EditorConfig in your projects? poll
New
JoeZMar
After the keyboard thread has convinced me to purchase a UHK I wanted to make one about the mouse. Switching to a programmable keyboard h...
New
mkunikow
SpaceVim is a community-driven vim distribution that seeks to provide layer feature, especially for neovim. It offers a variety of layers...
New
Nezteb
I frequently switch between ElixirLS, Lexical, and Next LS in order to test each out and compare/contrast. I decided to create a brief fe...
New
AstonJ
Welcome to our thread for Mac users :smiley: Windows users please use this thread Linux users please use this thread For those who dis...
New
AstonJ
What are you using for software dev? Can you share what you like/dislike about it? Would you recommend it to others? Related thread: Ho...
New
AstonJ
Welcome to our thread for Linux users :smiley: Mac users please use this thread Windows users please use this thread For those who dis...
New

Other popular topics Top

marius95
Hello everyone, I try to use an Javascript Event Handler in my root.html.leex file. Therefore I created a function in the app.js file: ...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 53690 245
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36128 110
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New

We're in Beta

About us Mission Statement