Test Load Balancer: Rocket Booster for your Build
Presented by:
15 years ago
| 22 interested

Test Load Balancer (TLB) is a tool that can automatically partition tests into multiple subsets, each one of which can be executed in parallel. The execution can happen on different physical/virtual machines or on the same machine as different processes or threads. The more the partitions, the less the number of tests executed on each one, and since all of the partitions start at the same time (and finish almost at the same time) overall test-execution time gets divided by the number of partitions you make. Test-running is by far the longest step in most (if not all) builds, and cutting down test-running time speeds up the build and hence the feedback loop. TLB can be used for any kind of test-suite – unit, integration or functional tests.

In addition to balancing, TLB does other interesting things like re-order tests within a subset (set of tests that run on a partition) before they are executed. For instance, it re-arranges tests to execute failing ones (that failed in the previous build) first, hence ensuring early feedback.

Most build servers (like Hudson, Go, TeamCity, Bamboo, etc.) and even tools like capistrano/cluster-ssh provide parallel execution capability (capability to execute command(s) on different machines at the same time). However, parallelization of tests needs a tool that can decide what tests need to be run in each such parallely running process across machines. This is where TLB comes in.

This talk will introduce the audience to TLB concepts and include a demo of using TLB to partition RSpec and Test::Unit suites. It’ll also include a case-study on how TLB helped cut build time from approximately 70 minutes to 11 minutes (which can of course be further reduced) just by throwing more hardware at it.

Share this session:

Comments

Leave a Reply