Skip to content

Starting up with Tlb

itspanzi edited this page Oct 4, 2010 · 5 revisions

Using TLB

TLB has 2 main components

  1. TLB Balancer task
  2. TLB Server

TLB Balancer

The balancer is the code that sits in the build script that knows how to do the splitting, reordering and publishing of test data.

A Balancer in turn contains:

  • Splitter: This takes care of splitting the given list of tests based on a certain criteria.
  • Orderer: This takes care of ordering the tests based on a given criteria.

For example, the Ant JUnit support done using Ant FileSets for the JUnit task is a typical balancer. This task obtains the historical test data from the TLB Server and uses it to split and order the tests.

In order for the balancer to work, the following environment variables need to be set:

  • TLB_URL
  • TALK_TO_SERVICE
  • TLB_CRITERIA
  • CRITERIA_DEFAULTING_ORDER
  • TLB_ORDERER
  • TOTAL_PARTITIONS
  • PARTITION_NUMBER
  • TLB_JOB_NAME
  • JOB_VERSION

Using the TLB_URL and TALK_TO_SERVICE, the balancer figures out how to talk to the Tlb Server. Based on the TLB_CRITERIA and the CRITERIA_DEFAULTING_ORDER it figures out what information to fetch from the Tlb Server for the given TLB_JOB_NAME and gets that. Using the TOTAL_PARTITIONS and the PARTITION_NUMBER, the tests are split. Once the tests are executed, the TLB_JOB_NAME and the JOB_VERSION are used to post the test data to the Tlb Server.

For all the configurable environment variables and discription of possible values, please refer Configuration Variables.

Take a look at Splitter/Balancer Criteria Configuration and Orderer Configuration to figure out how to configure Splitters and Orderers.
Also, take a look at some Typical Balancer Example Setups

TLB Server

Tlb Server is the repository of the test run data. Tlb Balancer uses the server to obtain historical data and it also puts new data for runs.

Setting up TLB Server talks about the how to configure a Tlb server. Also, take a look at some Typical Server Example Setups