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

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
AstonJ
Do we have any frequent travellers or digital nomads here? If so where have you been and do you have any tips to share? (Particularly in...
New
hq1
Hey! Just wanted to share my ExUnit NeoVim plugin: GitHub - aerosol/nvim-exunit: Opinionated ExUnit test runner for NeoVim · GitHub The...
New
bwlang
I want to buld this docker image but it fails with a timeout at RUN mix local.hex --force Maybe it’s just a maintenance window, but the...
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
Tyson
I know there are lot of shell-theme nerds in this group. I want to share a little something that Claude and I have been working on in our...
New
AstonJ
Welcome to our thread for Windows users :smiley: Mac users please use this thread Linux users please use this thread For those who dis...
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
AstonJ
I wasn’t aware ZSH has plugins until @Samjowen mentioned one in the Share an Elixir or dev-env tip a day thread! Oh My Zsh comes bundle...
New
SpaceVim
I am author of SpaceVim, As you know SpaceVim is a vim config which provide layer feature. https://github.com/SpaceVim/SpaceVim I want ...
New

Other popular topics Top

axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 48475 226
New
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
johnnyicon
Hi all, I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I’m trying to use Postgres...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39523 209
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
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

We're in Beta

About us Mission Statement