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

bitboxer
In the last couple of months I only played a little bit with elixir, haven’t had much time to actually build something with it. But now t...
New
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
Dusty
New England download page New England repo I am a long-time dark theme user, but I recently developed an interest in coding on a light ...
New
mhanberg
Hi y’all! I have started a dedicated Elixir plugin for Neovim. It is still early days, but please check it! GitHub - elixir-tools/elixir...
New
Cervajz
Code at the speed of thought Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter. It’s also open...
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
dimitarvp
It would also be the reason for me to seriously hurt myself. :003: I’ve spent way too much time tinkering. I’ll be the first to agree th...
New
ariandanim
Dear all, Does anyone has tried using ARM Laptop Snapdragon? I am planning to buy new one for my daily coding, but still need some sugg...
New
sodapopcan
I just placed on an order for my first mechanical watch since I last wore one in my mid 20s which was… oh boy, technically decadeS ago (t...
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
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
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement